Skip to content

Commit 181d039

Browse files
committed
[RISCV] Add missing constraints for vwsll
Add missing early clobber and widen constraints for vector crypto instruction: vwsll Differential Revision: https://reviews.llvm.org/D149127
1 parent 73fbe9c commit 181d039

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ let Predicates = [HasStdExtZvbb] in {
138138
def VREV8_V : VALUVs2<0b010010, 0b01001, OPMVV, "vrev8.v">;
139139
defm VROL_V : VALU_IV_V_X<"vrol", 0b010101>;
140140
defm VROR_V : VROR_IV_V_X_I<"vror", 0b010100>;
141+
let Constraints = "@earlyclobber $vd", RVVConstraint = WidenV in
141142
defm VWSLL_V : VALU_IV_V_X_I<"vwsll", 0b110101, uimm5>;
142143
} // Predicates = [HasStdExtZvbb]
143144

llvm/test/MC/RISCV/rvv/zvbb-invalid.s

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# RUN: not llvm-mc -triple=riscv64 --mattr=+zve64x --mattr=+experimental-zvbb %s 2>&1 \
2+
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
3+
4+
vwsll.vv v2, v2, v4
5+
# CHECK-ERROR: The destination vector register group cannot overlap the source vector register group.
6+
# CHECK-ERROR-LABEL: vwsll.vv v2, v2, v4
7+
8+
vwsll.vx v2, v2, x10
9+
# CHECK-ERROR: The destination vector register group cannot overlap the source vector register group.
10+
# CHECK-ERROR-LABEL: vwsll.vx v2, v2, x10
11+
12+
vwsll.vi v2, v2, 1
13+
# CHECK-ERROR: The destination vector register group cannot overlap the source vector register group.
14+
# CHECK-ERROR-LABEL: vwsll.vi v2, v2, 1

0 commit comments

Comments
 (0)