[llvm-branch-commits] [llvm-branch] r104625 - in /llvm/branches/Apple/Morbo: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
Dale Johannesen
dalej at apple.com
Tue May 25 12:00:25 PDT 2010
Author: johannes
Date: Tue May 25 14:00:24 2010
New Revision: 104625
URL: http://llvm.org/viewvc/llvm-project?rev=104625&view=rev
Log:
$ svn merge -c 104619 https://dalej@llvm.org/svn/llvm-project/llvm/trunk
--- Merging r104619 into '.':
U lib/CodeGen/SelectionDAG/DAGCombiner.cpp
$ svn merge -c 104624 https://dalej@llvm.org/svn/llvm-project/llvm/trunk
--- Merging r104624 into '.':
A test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
G lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Added:
llvm/branches/Apple/Morbo/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
- copied unchanged from r104624, llvm/trunk/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
Modified:
llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=104625&r1=104624&r2=104625&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue May 25 14:00:24 2010
@@ -3422,8 +3422,12 @@
// fold (sext (truncate (srl (load x), c))) -> (sext (smaller load (x+c/n)))
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 SDValue(N, 0); // Return N so it doesn't get rechecked!
}
@@ -3596,8 +3600,12 @@
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::ZERO_EXTEND, N->getDebugLoc(), VT, NarrowLoad);
}
}
@@ -3761,8 +3769,12 @@
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);
}
}
More information about the llvm-branch-commits
mailing list