Skip to content

Commit a1463ca

Browse files
authored
[RISCV] Add missing assembler test case for c.addi zero, 0. NFC (#112291)
This is an assembly only alias for c.nop.
1 parent ae7751f commit a1463ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/test/MC/RISCV/rv32c-valid.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ c.sub a4, a5
147147
# CHECK-ASM: encoding: [0x01,0x00]
148148
# CHECK-NO-EXT: error: instruction requires the following: 'C' (Compressed Instructions) or 'Zca' (part of the C extension, excluding compressed floating point loads/stores){{$}}
149149
c.nop
150+
# CHECK-ASM: c.addi zero, 0
151+
# CHECK-OBJ: c.nop
152+
# CHECK-ASM: encoding: [0x01,0x00]
153+
# CHECK-NO-EXT: error: instruction requires the following: 'C' (Compressed Instructions) or 'Zca' (part of the C extension, excluding compressed floating point loads/stores){{$}}
154+
c.addi x0, 0
150155
# CHECK-ASM-AND-OBJ: c.ebreak
151156
# CHECK-ASM: encoding: [0x02,0x90]
152157
# CHECK-NO-EXT: error: instruction requires the following: 'C' (Compressed Instructions) or 'Zca' (part of the C extension, excluding compressed floating point loads/stores){{$}}

0 commit comments

Comments
 (0)