Use SDValue bool check to tidyup some possible combines. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Pilgrim 2015-03-15 17:21:35 +00:00
parent 4f3864d05f
commit ec009464f2

View File

@ -16162,21 +16162,19 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget* Subtarget,
SDLoc dl(Op);
SDValue R = Op.getOperand(0);
SDValue Amt = Op.getOperand(1);
SDValue V;
assert(VT.isVector() && "Custom lowering only for vector shifts!");
assert(Subtarget->hasSSE2() && "Only custom lower when we have SSE2!");
V = LowerScalarImmediateShift(Op, DAG, Subtarget);
if (V.getNode())
if (SDValue V = LowerScalarImmediateShift(Op, DAG, Subtarget))
return V;
V = LowerScalarVariableShift(Op, DAG, Subtarget);
if (V.getNode())
if (SDValue V = LowerScalarVariableShift(Op, DAG, Subtarget))
return V;
if (Subtarget->hasAVX512() && (VT == MVT::v16i32 || VT == MVT::v8i64))
return Op;
// AVX2 has VPSLLV/VPSRAV/VPSRLV.
if (Subtarget->hasInt256()) {
if (Op.getOpcode() == ISD::SRL &&