[llvm-branch-commits] [llvm-branch] r103956 - in /llvm/branches/Apple/Morbo: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/2010-05-10-DAGCombinerBug.ll
Evan Cheng
evan.cheng at apple.com
Mon May 17 11:31:13 PDT 2010
Author: evancheng
Date: Mon May 17 13:31:13 2010
New Revision: 103956
URL: http://llvm.org/viewvc/llvm-project?rev=103956&view=rev
Log:
Merge 103419.
Added:
llvm/branches/Apple/Morbo/test/CodeGen/X86/2010-05-10-DAGCombinerBug.ll
- copied unchanged from r103419, llvm/trunk/test/CodeGen/X86/2010-05-10-DAGCombinerBug.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=103956&r1=103955&r2=103956&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 17 13:31:13 2010
@@ -760,12 +760,18 @@
bool Replace1 = false;
SDValue N1 = Op.getOperand(1);
- SDValue NN1 = PromoteOperand(N1, PVT, Replace1);
- if (NN1.getNode() == 0)
- return SDValue();
+ SDValue NN1;
+ if (N0 == N1)
+ NN1 = NN0;
+ else {
+ NN1 = PromoteOperand(N1, PVT, Replace1);
+ if (NN1.getNode() == 0)
+ return SDValue();
+ }
AddToWorkList(NN0.getNode());
- AddToWorkList(NN1.getNode());
+ if (NN1.getNode())
+ AddToWorkList(NN1.getNode());
if (Replace0)
ReplaceLoadWithPromotedLoad(N0.getNode(), NN0.getNode());
More information about the llvm-branch-commits
mailing list