Skip to content

Commit fee4c16

Browse files
authored
[RISCV] Add IsSignExtendingOpW to Zabha and Zalasr instructions. (#162341)
1 parent 681bd80 commit fee4c16

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZa.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def WRS_STO : WRSInst<0b000000011101, "wrs.sto">, Sched<[]>;
140140
// Zabha (Byte and Halfword Atomic Memory Operations)
141141
//===----------------------------------------------------------------------===//
142142

143-
let Predicates = [HasStdExtZabha] in {
143+
let Predicates = [HasStdExtZabha], IsSignExtendingOpW = 1 in {
144144
defm AMOSWAP_B : AMO_rr_aq_rl<0b00001, 0b000, "amoswap.b">,
145145
Sched<[WriteAtomicB, ReadAtomicBA, ReadAtomicBD]>;
146146
defm AMOADD_B : AMO_rr_aq_rl<0b00000, 0b000, "amoadd.b">,
@@ -181,7 +181,7 @@ defm AMOMAXU_H : AMO_rr_aq_rl<0b11100, 0b001, "amomaxu.h">,
181181
}
182182

183183
// If Zacas extension is also implemented, Zabha further provides AMOCAS.[B|H].
184-
let Predicates = [HasStdExtZabha, HasStdExtZacas] in {
184+
let Predicates = [HasStdExtZabha, HasStdExtZacas], IsSignExtendingOpW = 1 in {
185185
defm AMOCAS_B : AMO_cas_aq_rl<0b00101, 0b000, "amocas.b", GPR>;
186186
defm AMOCAS_H : AMO_cas_aq_rl<0b00101, 0b001, "amocas.h", GPR>;
187187
}

llvm/lib/Target/RISCV/RISCVInstrInfoZalasr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ multiclass SRL_r_aq_rl<bits<3> funct3, string opcodestr> {
4545
// Instructions
4646
//===----------------------------------------------------------------------===//
4747

48-
let Predicates = [HasStdExtZalasr] in {
48+
let Predicates = [HasStdExtZalasr], IsSignExtendingOpW = 1 in {
4949
defm LB : LAQ_r_aq_rl<0b000, "lb">;
5050
defm LH : LAQ_r_aq_rl<0b001, "lh">;
5151
defm LW : LAQ_r_aq_rl<0b010, "lw">;

0 commit comments

Comments
 (0)