Skip to content

Commit

Permalink
[RISCV] Add more out of range immediate tests to rv64zbp-invalid.s. NFC
Browse files Browse the repository at this point in the history
This tests the Zbp instructions that change immediate range between
riscv32 and riscv64. We were only testing them for riscv32 before.
  • Loading branch information
topperc committed Apr 26, 2022
1 parent 55ce296 commit 4c98e18
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions llvm/test/MC/RISCV/rv64zbp-invalid.s
Expand Up @@ -20,3 +20,15 @@ shflw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
unshflw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
# Too few operands
xperm.w t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
# Immediate operand out of range
gorci t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
gorci t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
# Immediate operand out of range
grevi t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
grevi t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
# Immediate operand out of range
shfli t0, t1, 32 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
shfli t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
# Immediate operand out of range
unshfli t0, t1, 32 # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 31]
unshfli t0, t1, -1 # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 31]

0 comments on commit 4c98e18

Please sign in to comment.