Skip to content

Commit a5a125c

Browse files
committed
[RISCV] Pass sign-extended value to isInt check in expandMul
In the isInt check that was added in # we were passing the zero-extended uint64_t value instead of the sign-extended one.
1 parent 283fd3f commit a5a125c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16079,7 +16079,7 @@ static SDValue expandMul(SDNode *N, SelectionDAG &DAG,
1607916079
uint64_t MulAmt = CNode->getZExtValue();
1608016080

1608116081
// Don't do this if the Xqciac extension is enabled and the MulAmt in simm12.
16082-
if (Subtarget.hasVendorXqciac() && isInt<12>(MulAmt))
16082+
if (Subtarget.hasVendorXqciac() && isInt<12>(CNode->getSExtValue()))
1608316083
return SDValue();
1608416084

1608516085
const bool HasShlAdd = Subtarget.hasStdExtZba() ||

0 commit comments

Comments
 (0)