Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / rv32zbs-valid.s
blob38ea13bbd1d0f90bf28297c1000387385e304441
1 # With Bitmanip single bit extension:
2 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zbs -show-encoding \
3 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zbs -show-encoding \
5 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
6 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zbs < %s \
7 # RUN: | llvm-objdump --mattr=+zbs -d -r - \
8 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zbs < %s \
10 # RUN: | llvm-objdump --mattr=+zbs -d -r - \
11 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
13 # CHECK-ASM-AND-OBJ: bclr t0, t1, t2
14 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x48]
15 bclr t0, t1, t2
16 # CHECK-ASM-AND-OBJ: bset t0, t1, t2
17 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x28]
18 bset t0, t1, t2
19 # CHECK-ASM-AND-OBJ: binv t0, t1, t2
20 # CHECK-ASM: encoding: [0xb3,0x12,0x73,0x68]
21 binv t0, t1, t2
22 # CHECK-ASM-AND-OBJ: bext t0, t1, t2
23 # CHECK-ASM: encoding: [0xb3,0x52,0x73,0x48]
24 bext t0, t1, t2
25 # CHECK-ASM-AND-OBJ: bclri t0, t1, 1
26 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x48]
27 bclri t0, t1, 1
28 # CHECK-ASM-AND-OBJ: bseti t0, t1, 1
29 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x28]
30 bseti t0, t1, 1
31 # CHECK-ASM-AND-OBJ: binvi t0, t1, 1
32 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x68]
33 binvi t0, t1, 1
34 # CHECK-ASM-AND-OBJ: bexti t0, t1, 1
35 # CHECK-ASM: encoding: [0x93,0x52,0x13,0x48]
36 bexti t0, t1, 1