OSDN Git Service

Use the correct shift amount type.
authorOwen Anderson <resistor@mac.com>
Mon, 28 Feb 2011 21:10:10 +0000 (21:10 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 28 Feb 2011 21:10:10 +0000 (21:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126684 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

index c3e9f9a..767b774 100644 (file)
@@ -226,7 +226,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_BSWAP(SDNode *N) {
 
   unsigned DiffBits = NVT.getSizeInBits() - OVT.getSizeInBits();
   return DAG.getNode(ISD::SRL, dl, NVT, DAG.getNode(ISD::BSWAP, dl, NVT, Op),
-                     DAG.getConstant(DiffBits, TLI.getPointerTy()));
+                     DAG.getConstant(DiffBits, TLI.getShiftAmountTy(NVT)));
 }
 
 SDValue DAGTypeLegalizer::PromoteIntRes_BUILD_PAIR(SDNode *N) {