From 6b2d69655ace2788b244c8a4ebcfb6f2a926ad92 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 9 Nov 2005 16:50:40 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }