]> granicus.if.org Git - llvm/commitdiff
[SelectionDAG] Remove a check for type being a vector type after calling getShiftAmou...
authorCraig Topper <craig.topper@intel.com>
Mon, 11 Sep 2017 16:15:39 +0000 (16:15 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 11 Sep 2017 16:15:39 +0000 (16:15 +0000)
getShiftAmountTy already returns the vector type when called for vectors.

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

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 3a55e4da1ab6b0822eab8361404bfb051eccd0ac..ba944f60f7bd2a398ddfa4be11a2aff89b58518b 100644 (file)
@@ -2985,8 +2985,6 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
     // NOTE: we could fall back on load/store here too for targets without
     // SRA.  However, it is doubtful that any exist.
     EVT ShiftAmountTy = TLI.getShiftAmountTy(VT, DAG.getDataLayout());
-    if (VT.isVector())
-      ShiftAmountTy = VT;
     unsigned BitsDiff = VT.getScalarSizeInBits() -
                         ExtraVT.getScalarSizeInBits();
     SDValue ShiftCst = DAG.getConstant(BitsDiff, dl, ShiftAmountTy);