[llvm-commits] [llvm] r157873 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Akira Hatanaka
ahatanaka at mips.com
Fri Jun 1 18:10:34 PDT 2012
Author: ahatanak
Date: Fri Jun 1 20:10:34 2012
New Revision: 157873
URL: http://llvm.org/viewvc/llvm-project?rev=157873&view=rev
Log:
Fix a bug in the code which custom-lowers truncating stores in LegalizeDAG.
Check that the SDValue TargetLowering::LowerOperation returns is not null
before replacing the original node with the returned node.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=157873&r1=157872&r2=157873&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Jun 1 20:10:34 2012
@@ -1312,8 +1312,9 @@
}
break;
case TargetLowering::Custom:
- ReplaceNode(SDValue(Node, 0),
- TLI.LowerOperation(SDValue(Node, 0), DAG));
+ Tmp1 = TLI.LowerOperation(SDValue(Node, 0), DAG);
+ if (Tmp1.getNode())
+ ReplaceNode(SDValue(Node, 0), Tmp1);
break;
case TargetLowering::Expand:
assert(!StVT.isVector() &&
More information about the llvm-commits
mailing list