Fix CodeGen/X86/shift-folding.ll:test3 on X86
authorChris Lattner <sabre@nondot.org>
Wed, 9 Nov 2005 16:50:40 +0000 (16:50 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 9 Nov 2005 16:50:40 +0000 (16:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24256 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index ac4a63049cb16105ce3dc30941e81d84c893ff84..306d970897b8a1da14ab564f045139db53ba6317 100644 (file)
@@ -641,7 +641,7 @@ void SelectionDAGLowering::visitGetElementPtr(User &I) {
       if (isPowerOf2_64(ElementSize)) {
         unsigned Amt = Log2_64(ElementSize);
         IdxN = DAG.getNode(ISD::SHL, N.getValueType(), IdxN,
-                           getIntPtrConstant(Amt));
+                           DAG.getConstant(Amt, TLI.getShiftAmountTy()));
         N = DAG.getNode(ISD::ADD, N.getValueType(), N, IdxN);
         continue;
       }