forked from OSchip/llvm-project
[X86] In WidenMaskArithmetic, make sure we check the input type of a truncate on N1.
Later in the code we explicitly bypass the truncate so we should be checking its type to make sure that it's safe. llvm-svn: 321407
This commit is contained in:
parent
dbbbb8532c
commit
e79a7a4b2e
|
@ -33046,7 +33046,8 @@ static SDValue WidenMaskArithmetic(SDNode *N, SelectionDAG &DAG,
|
|||
return SDValue();
|
||||
|
||||
// The right side has to be a 'trunc' or a constant vector.
|
||||
bool RHSTrunc = N1.getOpcode() == ISD::TRUNCATE;
|
||||
bool RHSTrunc = N1.getOpcode() == ISD::TRUNCATE &&
|
||||
N1.getOperand(0).getValueType() == VT;
|
||||
ConstantSDNode *RHSConstSplat = nullptr;
|
||||
if (auto *RHSBV = dyn_cast<BuildVectorSDNode>(N1))
|
||||
RHSConstSplat = RHSBV->getConstantSplatNode();
|
||||
|
|
Loading…
Reference in New Issue