mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Fix another variant of PR 7191. Also add a testcase
Mon Ping provided; unfortunately bugpoint failed to reduce it, but I think it's important to have a test for this in the suite. 8023512. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79373680ed
commit
86234c30a7
@ -3832,8 +3832,12 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
|
||||
if (N0.getOpcode() == ISD::TRUNCATE) {
|
||||
SDValue NarrowLoad = ReduceLoadWidth(N0.getNode());
|
||||
if (NarrowLoad.getNode()) {
|
||||
if (NarrowLoad.getNode() != N0.getNode())
|
||||
SDNode* oye = N0.getNode()->getOperand(0).getNode();
|
||||
if (NarrowLoad.getNode() != N0.getNode()) {
|
||||
CombineTo(N0.getNode(), NarrowLoad);
|
||||
// CombineTo deleted the truncate, if needed, but not what's under it.
|
||||
AddToWorkList(oye);
|
||||
}
|
||||
return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, NarrowLoad);
|
||||
}
|
||||
}
|
||||
|
2718
test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
Normal file
2718
test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user