Skip to content
Open
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
4 changes: 2 additions & 2 deletions llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5695,8 +5695,8 @@ static SDValue combineMulWide(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
SDValue RHS = Op.getOperand(1);
if (Op.getOpcode() == ISD::SHL) {
const auto ShiftAmt = Op.getConstantOperandVal(1);
const auto MulVal = APInt(ToVT.getSizeInBits(), 1) << ShiftAmt;
RHS = DCI.DAG.getConstant(MulVal, DL, ToVT);
const auto MulVal = APInt(FromVT.getSizeInBits(), 1) << ShiftAmt;
RHS = DCI.DAG.getConstant(MulVal, DL, FromVT);
Comment on lines +5698 to +5699
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to add a test that would catch such a mismatch.

}
return DCI.DAG.getNode(Opcode, DL, ToVT, Op.getOperand(0), RHS);
}
Expand Down