Skip to content

Commit 1e30396

Browse files
committed
[RISCV] Support negative constants in CompressInstEmitter
Summary: Some compressed instructions match against negative values; store immediates as a signed value such that these patterns will now match the intended instructions. Reviewers: asb, lenary, PaoloS Reviewed By: asb Subscribers: rbar, johnrusso, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, evandro, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76767
1 parent 5fad05e commit 1e30396

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/RISCVCompressInstEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class RISCVCompressInstEmitter {
8585
MapKind Kind;
8686
union {
8787
unsigned Operand; // Operand number mapped to.
88-
uint64_t Imm; // Integer immediate value.
88+
int64_t Imm; // Integer immediate value.
8989
Record *Reg; // Physical register.
9090
} Data;
9191
int TiedOpIdx = -1; // Tied operand index within the instruction.

0 commit comments

Comments
 (0)