From: Chris Lattner Date: Wed, 9 Nov 2005 16:50:40 +0000 (+0000) Subject: Fix CodeGen/X86/shift-folding.ll:test3 on X86 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6b2d69655ace2788b244c8a4ebcfb6f2a926ad92;p=oota-llvm.git Fix CodeGen/X86/shift-folding.ll:test3 on X86 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24256 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ac4a63049cb..306d970897b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -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; }