[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed May 11 23:54:39 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.109 -> 1.110
---
Log message:
Make sure to expand all nodes, avoiding unintentional node duplication.
---
Diffs of the changes: (+7 -0)
LegalizeDAG.cpp | 7 +++++++
1 files changed, 7 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.109 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.110
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.109 Thu May 12 01:04:14 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu May 12 01:54:21 2005
@@ -2168,6 +2168,13 @@
TargetLowering::ArgListTy Args;
const Type *ArgTy = MVT::getTypeForValueType(Source.getValueType());
+
+ // Expand the source, then glue it back together for the call. We must expand
+ // the source in case it is shared (this pass of legalize must traverse it).
+ SDOperand SrcLo, SrcHi;
+ ExpandOp(Source, SrcLo, SrcHi);
+ Source = DAG.getNode(ISD::BUILD_PAIR, Source.getValueType(), SrcLo, SrcHi);
+
Args.push_back(std::make_pair(Source, ArgTy));
// We don't care about token chains for libcalls. We just use the entry
More information about the llvm-commits
mailing list