[llvm] bc165de - [RISCV] Minor fixes to rv64c-valid.s test.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 10:46:22 PDT 2022


Author: Craig Topper
Date: 2022-07-26T10:42:59-07:00
New Revision: bc165de1c74a2f80d7c39c92cdcf6945ef5b6aa4

URL: https://github.com/llvm/llvm-project/commit/bc165de1c74a2f80d7c39c92cdcf6945ef5b6aa4
DIFF: https://github.com/llvm/llvm-project/commit/bc165de1c74a2f80d7c39c92cdcf6945ef5b6aa4.diff

LOG: [RISCV] Minor fixes to rv64c-valid.s test.

-Missing CHECK-NO-EXT and CHECK-NO-RV64 on subw.
-Stray CHECK-NO-RV64 on c.slli.
-c.slli used immediate 1 instead of RV64 only immediate like 63.
-Missing CHECK-NO-EXT on c.srli and c.srai

Added: 
    

Modified: 
    llvm/test/MC/RISCV/rv64c-valid.s

Removed: 
    


################################################################################
diff  --git a/llvm/test/MC/RISCV/rv64c-valid.s b/llvm/test/MC/RISCV/rv64c-valid.s
index 36bd353173271..ffb67e3656203 100644
--- a/llvm/test/MC/RISCV/rv64c-valid.s
+++ b/llvm/test/MC/RISCV/rv64c-valid.s
@@ -37,6 +37,8 @@ c.sd a5, 248(a3)
 
 # CHECK-ASM-AND-OBJ: c.subw a3, a4
 # CHECK-ASM: encoding: [0x99,0x9e]
+# CHECK-NO-EXT:  error: instruction requires the following: 'C' (Compressed Instructions)
+# CHECK-NO-RV64:  error: instruction requires the following: RV64I Base Instruction Set
 c.subw a3, a4
 # CHECK-ASM-AND-OBJ: c.addw a0, a2
 # CHECK-ASM: encoding: [0x31,0x9d]
@@ -55,14 +57,15 @@ c.addiw a3, -32
 # CHECK-NO-RV64:  error: instruction requires the following: RV64I Base Instruction Set
 c.addiw a3, 31
 
-# CHECK-ASM-AND-OBJ: c.slli s0, 1
-# CHECK-ASM: encoding: [0x06,0x04]
+# CHECK-ASM-AND-OBJ: c.slli s0, 63
+# CHECK-ASM: encoding: [0x7e,0x14]
 # CHECK-NO-EXT:  error: instruction requires the following: 'C' (Compressed Instructions)
-# CHECK-NO-RV64:  error: instruction requires the following: RV64I Base Instruction Set
-c.slli s0, 1
+c.slli s0, 63
 # CHECK-ASM-AND-OBJ: c.srli a3, 63
 # CHECK-ASM: encoding: [0xfd,0x92]
+# CHECK-NO-EXT:  error: instruction requires the following: 'C' (Compressed Instructions)
 c.srli a3, 63
 # CHECK-ASM-AND-OBJ: c.srai a2, 63
 # CHECK-ASM: encoding: [0x7d,0x96]
+# CHECK-NO-EXT:  error: instruction requires the following: 'C' (Compressed Instructions)
 c.srai a2, 63


        


More information about the llvm-commits mailing list