Fix PR1049 and CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
authorChris Lattner <sabre@nondot.org>
Sat, 16 Dec 2006 21:14:48 +0000 (21:14 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 16 Dec 2006 21:14:48 +0000 (21:14 +0000)
by producing target constants instead of constants.  Constants can get
selected to li/movri instructions, which causes the scheduler to explode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32633 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index ff7414ae36fbb617347164465cae9b1d38ff1015..ca9c8c7546240b78be83f6da7dc2a55c366e0ac7 100644 (file)
@@ -4399,7 +4399,8 @@ SelectInlineAsmMemoryOperands(std::vector<SDOperand> &Ops, SelectionDAG &DAG) {
       }
       
       // Add this to the output node.
-      Ops.push_back(DAG.getConstant(4/*MEM*/ | (SelOps.size() << 3), MVT::i32));
+      Ops.push_back(DAG.getTargetConstant(4/*MEM*/ | (SelOps.size() << 3),
+                                          MVT::i32));
       Ops.insert(Ops.end(), SelOps.begin(), SelOps.end());
       i += 2;
     }