Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50957,15 +50957,13 @@ static SDValue PromoteMaskArithmetic(SDValue N, const SDLoc &DL, EVT VT,
if (SDValue NN0 = PromoteMaskArithmetic(N0, DL, VT, DAG, Depth + 1))
N0 = NN0;
else {
// The left side has to be a trunc.
if (N0.getOpcode() != ISD::TRUNCATE)
return SDValue();

// The type of the truncated inputs.
if (N0.getOperand(0).getValueType() != VT)
// The left side has to be a 'trunc'.
bool LHSTrunc = N0.getOpcode() == ISD::TRUNCATE &&
N0.getOperand(0).getValueType() == VT;
if (LHSTrunc)
N0 = N0.getOperand(0);
else
return SDValue();

N0 = N0.getOperand(0);
}

if (SDValue NN1 = PromoteMaskArithmetic(N1, DL, VT, DAG, Depth + 1))
Expand Down