mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01: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. llvm-svn: 104624
This commit is contained in:
parent
28018eed17
commit
8fd73c1910
@ -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…
Reference in New Issue
Block a user