diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td @@ -138,6 +138,7 @@ def VREV8_V : VALUVs2<0b010010, 0b01001, OPMVV, "vrev8.v">; defm VROL_V : VALU_IV_V_X<"vrol", 0b010101>; defm VROR_V : VROR_IV_V_X_I<"vror", 0b010100>; + let Constraints = "@earlyclobber $vd", RVVConstraint = WidenV in defm VWSLL_V : VALU_IV_V_X_I<"vwsll", 0b110101, uimm5>; } // Predicates = [HasStdExtZvbb] diff --git a/llvm/test/MC/RISCV/rvv/zvbb-invalid.s b/llvm/test/MC/RISCV/rvv/zvbb-invalid.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/RISCV/rvv/zvbb-invalid.s @@ -0,0 +1,14 @@ +# RUN: not llvm-mc -triple=riscv64 --mattr=+zve64x --mattr=+experimental-zvbb %s 2>&1 \ +# RUN: | FileCheck %s --check-prefix=CHECK-ERROR + +vwsll.vv v2, v2, v4 +# CHECK-ERROR: The destination vector register group cannot overlap the source vector register group. +# CHECK-ERROR-LABEL: vwsll.vv v2, v2, v4 + +vwsll.vx v2, v2, x10 +# CHECK-ERROR: The destination vector register group cannot overlap the source vector register group. +# CHECK-ERROR-LABEL: vwsll.vx v2, v2, x10 + +vwsll.vi v2, v2, 1 +# CHECK-ERROR: The destination vector register group cannot overlap the source vector register group. +# CHECK-ERROR-LABEL: vwsll.vi v2, v2, 1