Skip to content

Commit 4b685d3

Browse files
committed
Fix again
1 parent f648020 commit 4b685d3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
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() ||

llvm/test/CodeGen/RISCV/xqciac.ll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ entry:
464464
ret i32 %add
465465
}
466466

467-
define i32 @testmuliaddnegimm(i32 %a, i32 %b) {
467+
define i32 @testmuliaddnegimm(i32 %a) {
468468
; RV32IM-LABEL: testmuliaddnegimm:
469469
; RV32IM: # %bb.0:
470470
; RV32IM-NEXT: slli a1, a0, 1
@@ -482,6 +482,9 @@ define i32 @testmuliaddnegimm(i32 %a, i32 %b) {
482482
;
483483
; RV32IZBAMXQCIAC-LABEL: testmuliaddnegimm:
484484
; RV32IZBAMXQCIAC: # %bb.0:
485+
; RV32IZBAMXQCIAC-NEXT: li a1, 3
486+
; RV32IZBAMXQCIAC-NEXT: qc.muliadd a1, a0, -3
487+
; RV32IZBAMXQCIAC-NEXT: mv a0, a1
485488
; RV32IZBAMXQCIAC-NEXT: ret
486489
%mul = mul i32 %a, -3
487490
%add = add i32 %mul, 3

0 commit comments

Comments
 (0)