[llvm] r312924 - [SelectionDAG] Remove a check for type being a vector type after calling getShiftAmountTy. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 09:15:39 PDT 2017
Author: ctopper
Date: Mon Sep 11 09:15:39 2017
New Revision: 312924
URL: http://llvm.org/viewvc/llvm-project?rev=312924&view=rev
Log:
[SelectionDAG] Remove a check for type being a vector type after calling getShiftAmountTy. NFCI
getShiftAmountTy already returns the vector type when called for vectors.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=312924&r1=312923&r2=312924&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Sep 11 09:15:39 2017
@@ -2985,8 +2985,6 @@ bool SelectionDAGLegalize::ExpandNode(SD
// 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);
More information about the llvm-commits
mailing list