[llvm] 1e469c7 - [RISCV] Fix immediate operand ranges for XCVsimd instructions (#224876)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 20 06:51:56 PDT 2026


Author: Zeyi Xu
Date: 2026-09-20T21:51:50+08:00
New Revision: 1e469c741cf0f4c80fdff8749336366a8a5699a4

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

LOG: [RISCV] Fix immediate operand ranges for XCVsimd instructions (#224876)

See link:

-
https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/latest/instruction_set_extensions.html#simd-bit-manipulation-operations
-
https://docs.openhwgroup.org/projects/cv32e40p-user-manual/en/latest/instruction_set_extensions.html#simd-shuffle-and-pack-operations

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
    llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
    llvm/test/MC/RISCV/corev/XCVsimd.s

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
index 15f0652c0301e..72b2027dca1dc 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
@@ -519,16 +519,23 @@ let Predicates = [HasVendorXCVsimd, IsRV32] in {
 
   // 0b10110xx: UNDEF
 
-  def CV_EXTRACT_H :    CVSIMDRU<0b10111, 0, 0b000, "cv.extract.h">;
-  def CV_EXTRACT_B :    CVSIMDRU<0b10111, 0, 0b001, "cv.extract.b">;
-  def CV_EXTRACTU_H :   CVSIMDRU<0b10111, 0, 0b010, "cv.extractu.h">;
-  def CV_EXTRACTU_B :   CVSIMDRU<0b10111, 0, 0b011, "cv.extractu.b">;
-  def CV_INSERT_H :     CVSIMDRUWb<0b10111, 0, 0b100, "cv.insert.h">;
-  def CV_INSERT_B :     CVSIMDRUWb<0b10111, 0, 0b101, "cv.insert.b">;
+  def CV_EXTRACT_H :
+      CVSIMDRI<0b10111, 0, 0b000, "cv.extract.h", uimm1>;
+  def CV_EXTRACT_B :
+      CVSIMDRI<0b10111, 0, 0b001, "cv.extract.b", uimm2>;
+  def CV_EXTRACTU_H :
+      CVSIMDRI<0b10111, 0, 0b010, "cv.extractu.h", uimm1>;
+  def CV_EXTRACTU_B :
+      CVSIMDRI<0b10111, 0, 0b011, "cv.extractu.b", uimm2>;
+  def CV_INSERT_H :
+      CVSIMDRIWb<0b10111, 0, 0b100, "cv.insert.h", uimm1>;
+  def CV_INSERT_B :
+      CVSIMDRIWb<0b10111, 0, 0b101, "cv.insert.b", uimm2>;
 
   def CV_SHUFFLE_H :    CVSIMDRR<0b11000, 0, 0, 0b000, "cv.shuffle.h">;
   def CV_SHUFFLE_B :    CVSIMDRR<0b11000, 0, 0, 0b001, "cv.shuffle.b">;
-  def CV_SHUFFLE_SCI_H :   CVSIMDRU<0b11000, 0, 0b110, "cv.shuffle.sci.h">;
+  def CV_SHUFFLE_SCI_H :
+      CVSIMDRI<0b11000, 0, 0b110, "cv.shuffle.sci.h", uimm2>;
   def CV_SHUFFLEI0_SCI_B : CVSIMDRU<0b11000, 0, 0b111, "cv.shufflei0.sci.b">;
 
   def CV_SHUFFLEI1_SCI_B : CVSIMDRU<0b11001, 0, 0b111, "cv.shufflei1.sci.b">;

diff  --git a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
index 53310a0e084d7..bebf7e97c8236 100644
--- a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
@@ -2744,16 +2744,16 @@ cv.extract.h t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.extract.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.extract.h t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.extract.h t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
-cv.extract.h t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.extract.h t0, t1, 2
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.extract.h t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -2769,16 +2769,16 @@ cv.extract.b t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.extract.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.extract.b t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.extract.b t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
-cv.extract.b t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.extract.b t0, t1, 4
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.extract.b t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -2794,16 +2794,16 @@ cv.extractu.h t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.extractu.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.extractu.h t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.extractu.h t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
-cv.extractu.h t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.extractu.h t0, t1, 2
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.extractu.h t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -2819,16 +2819,16 @@ cv.extractu.b t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.extractu.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.extractu.b t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.extractu.b t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
-cv.extractu.b t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.extractu.b t0, t1, 4
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.extractu.b t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -2844,16 +2844,16 @@ cv.insert.h t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.insert.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.insert.h t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.insert.h t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
-cv.insert.h t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.insert.h t0, t1, 2
+# CHECK-ERROR: immediate must be an integer in the range [0, 1]
 
 cv.insert.h t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -2869,16 +2869,16 @@ cv.insert.b t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.insert.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.insert.b t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.insert.b t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
-cv.insert.b t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.insert.b t0, t1, 4
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.insert.b t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -2938,16 +2938,16 @@ cv.shuffle.sci.h t0, 0, t2
 # CHECK-ERROR: register must be a GPR
 
 cv.shuffle.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.shuffle.sci.h t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.shuffle.sci.h t0, t1, -1
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
-cv.shuffle.sci.h t0, t1, 64
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+cv.shuffle.sci.h t0, t1, 4
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
 
 cv.shuffle.sci.h t0, t1
 # CHECK-ERROR: too few operands for instruction
@@ -4945,4 +4945,3 @@ cv.sub.div8 t0, t1, 0
 
 cv.sub.div8 t0, t1
 # CHECK-ERROR: too few operands for instruction
-

diff  --git a/llvm/test/MC/RISCV/corev/XCVsimd.s b/llvm/test/MC/RISCV/corev/XCVsimd.s
index f921fafa62328..198c576344d72 100644
--- a/llvm/test/MC/RISCV/corev/XCVsimd.s
+++ b/llvm/test/MC/RISCV/corev/XCVsimd.s
@@ -2943,19 +2943,19 @@ cv.extract.h t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x02,0x03,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extract.h t3, t4, 32
-# CHECK-INSTR: cv.extract.h t3, t4, 32
-# CHECK-ENCODING: [0x7b,0x8e,0x0e,0xb9]
+cv.extract.h t3, t4, 1
+# CHECK-INSTR: cv.extract.h t3, t4, 1
+# CHECK-ENCODING: [0x7b,0x8e,0x0e,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extract.h a0, a1, 7
-# CHECK-INSTR: cv.extract.h a0, a1, 7
-# CHECK-ENCODING: [0x7b,0x85,0x35,0xba]
+cv.extract.h a0, a1, 0
+# CHECK-INSTR: cv.extract.h a0, a1, 0
+# CHECK-ENCODING: [0x7b,0x85,0x05,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extract.h s0, s1, 63
-# CHECK-INSTR: cv.extract.h s0, s1, 63
-# CHECK-ENCODING: [0x7b,0x84,0xf4,0xbb]
+cv.extract.h s0, s1, 1
+# CHECK-INSTR: cv.extract.h s0, s1, 1
+# CHECK-ENCODING: [0x7b,0x84,0x04,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -2967,19 +2967,19 @@ cv.extract.b t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x12,0x03,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extract.b t3, t4, 32
-# CHECK-INSTR: cv.extract.b t3, t4, 32
-# CHECK-ENCODING: [0x7b,0x9e,0x0e,0xb9]
+cv.extract.b t3, t4, 1
+# CHECK-INSTR: cv.extract.b t3, t4, 1
+# CHECK-ENCODING: [0x7b,0x9e,0x0e,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extract.b a0, a1, 7
-# CHECK-INSTR: cv.extract.b a0, a1, 7
-# CHECK-ENCODING: [0x7b,0x95,0x35,0xba]
+cv.extract.b a0, a1, 2
+# CHECK-INSTR: cv.extract.b a0, a1, 2
+# CHECK-ENCODING: [0x7b,0x95,0x15,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extract.b s0, s1, 63
-# CHECK-INSTR: cv.extract.b s0, s1, 63
-# CHECK-ENCODING: [0x7b,0x94,0xf4,0xbb]
+cv.extract.b s0, s1, 3
+# CHECK-INSTR: cv.extract.b s0, s1, 3
+# CHECK-ENCODING: [0x7b,0x94,0x14,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -2991,19 +2991,19 @@ cv.extractu.h t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x22,0x03,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extractu.h t3, t4, 32
-# CHECK-INSTR: cv.extractu.h t3, t4, 32
-# CHECK-ENCODING: [0x7b,0xae,0x0e,0xb9]
+cv.extractu.h t3, t4, 1
+# CHECK-INSTR: cv.extractu.h t3, t4, 1
+# CHECK-ENCODING: [0x7b,0xae,0x0e,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extractu.h a0, a1, 7
-# CHECK-INSTR: cv.extractu.h a0, a1, 7
-# CHECK-ENCODING: [0x7b,0xa5,0x35,0xba]
+cv.extractu.h a0, a1, 0
+# CHECK-INSTR: cv.extractu.h a0, a1, 0
+# CHECK-ENCODING: [0x7b,0xa5,0x05,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extractu.h s0, s1, 63
-# CHECK-INSTR: cv.extractu.h s0, s1, 63
-# CHECK-ENCODING: [0x7b,0xa4,0xf4,0xbb]
+cv.extractu.h s0, s1, 1
+# CHECK-INSTR: cv.extractu.h s0, s1, 1
+# CHECK-ENCODING: [0x7b,0xa4,0x04,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -3015,19 +3015,19 @@ cv.extractu.b t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x32,0x03,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extractu.b t3, t4, 32
-# CHECK-INSTR: cv.extractu.b t3, t4, 32
-# CHECK-ENCODING: [0x7b,0xbe,0x0e,0xb9]
+cv.extractu.b t3, t4, 1
+# CHECK-INSTR: cv.extractu.b t3, t4, 1
+# CHECK-ENCODING: [0x7b,0xbe,0x0e,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extractu.b a0, a1, 7
-# CHECK-INSTR: cv.extractu.b a0, a1, 7
-# CHECK-ENCODING: [0x7b,0xb5,0x35,0xba]
+cv.extractu.b a0, a1, 2
+# CHECK-INSTR: cv.extractu.b a0, a1, 2
+# CHECK-ENCODING: [0x7b,0xb5,0x15,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.extractu.b s0, s1, 63
-# CHECK-INSTR: cv.extractu.b s0, s1, 63
-# CHECK-ENCODING: [0x7b,0xb4,0xf4,0xbb]
+cv.extractu.b s0, s1, 3
+# CHECK-INSTR: cv.extractu.b s0, s1, 3
+# CHECK-ENCODING: [0x7b,0xb4,0x14,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -3039,19 +3039,19 @@ cv.insert.h t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x42,0x03,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.insert.h t3, t4, 32
-# CHECK-INSTR: cv.insert.h t3, t4, 32
-# CHECK-ENCODING: [0x7b,0xce,0x0e,0xb9]
+cv.insert.h t3, t4, 1
+# CHECK-INSTR: cv.insert.h t3, t4, 1
+# CHECK-ENCODING: [0x7b,0xce,0x0e,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.insert.h a0, a1, 7
-# CHECK-INSTR: cv.insert.h a0, a1, 7
-# CHECK-ENCODING: [0x7b,0xc5,0x35,0xba]
+cv.insert.h a0, a1, 0
+# CHECK-INSTR: cv.insert.h a0, a1, 0
+# CHECK-ENCODING: [0x7b,0xc5,0x05,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.insert.h s0, s1, 63
-# CHECK-INSTR: cv.insert.h s0, s1, 63
-# CHECK-ENCODING: [0x7b,0xc4,0xf4,0xbb]
+cv.insert.h s0, s1, 1
+# CHECK-INSTR: cv.insert.h s0, s1, 1
+# CHECK-ENCODING: [0x7b,0xc4,0x04,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -3063,19 +3063,19 @@ cv.insert.b t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x52,0x03,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.insert.b t3, t4, 32
-# CHECK-INSTR: cv.insert.b t3, t4, 32
-# CHECK-ENCODING: [0x7b,0xde,0x0e,0xb9]
+cv.insert.b t3, t4, 1
+# CHECK-INSTR: cv.insert.b t3, t4, 1
+# CHECK-ENCODING: [0x7b,0xde,0x0e,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.insert.b a0, a1, 7
-# CHECK-INSTR: cv.insert.b a0, a1, 7
-# CHECK-ENCODING: [0x7b,0xd5,0x35,0xba]
+cv.insert.b a0, a1, 2
+# CHECK-INSTR: cv.insert.b a0, a1, 2
+# CHECK-ENCODING: [0x7b,0xd5,0x15,0xb8]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.insert.b s0, s1, 63
-# CHECK-INSTR: cv.insert.b s0, s1, 63
-# CHECK-ENCODING: [0x7b,0xd4,0xf4,0xbb]
+cv.insert.b s0, s1, 3
+# CHECK-INSTR: cv.insert.b s0, s1, 3
+# CHECK-ENCODING: [0x7b,0xd4,0x14,0xba]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -3135,19 +3135,19 @@ cv.shuffle.sci.h t0, t1, 0
 # CHECK-ENCODING: [0xfb,0x62,0x03,0xc0]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.shuffle.sci.h t3, t4, 32
-# CHECK-INSTR: cv.shuffle.sci.h t3, t4, 32
-# CHECK-ENCODING: [0x7b,0xee,0x0e,0xc1]
+cv.shuffle.sci.h t3, t4, 1
+# CHECK-INSTR: cv.shuffle.sci.h t3, t4, 1
+# CHECK-ENCODING: [0x7b,0xee,0x0e,0xc2]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.shuffle.sci.h a0, a1, 7
-# CHECK-INSTR: cv.shuffle.sci.h a0, a1, 7
-# CHECK-ENCODING: [0x7b,0xe5,0x35,0xc2]
+cv.shuffle.sci.h a0, a1, 2
+# CHECK-INSTR: cv.shuffle.sci.h a0, a1, 2
+# CHECK-ENCODING: [0x7b,0xe5,0x15,0xc0]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
-cv.shuffle.sci.h s0, s1, 63
-# CHECK-INSTR: cv.shuffle.sci.h s0, s1, 63
-# CHECK-ENCODING: [0x7b,0xe4,0xf4,0xc3]
+cv.shuffle.sci.h s0, s1, 3
+# CHECK-INSTR: cv.shuffle.sci.h s0, s1, 3
+# CHECK-ENCODING: [0x7b,0xe4,0x14,0xc2]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
 
 //===----------------------------------------------------------------------===//
@@ -5285,4 +5285,3 @@ cv.sub.div8 s0, s1, s2
 # CHECK-INSTR: cv.sub.div8 s0, s1, s2
 # CHECK-ENCODING: [0x7b,0xe4,0x24,0x75]
 # CHECK-NO-EXT: instruction requires the following: 'XCVsimd' (CORE-V SIMD ALU){{$}}
-


        


More information about the llvm-commits mailing list