[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv64zbs-valid.s
blobed1fd0baa4211702963d79b73ead4b6054035a00
1 # With B extension:
2 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
3 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
5 # RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
6 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # With Bitmanip single bit extension:
9 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbs -show-encoding \
10 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
11 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbs < %s \
12 # RUN: | llvm-objdump --mattr=+experimental-zbs -d -r - \
13 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
15 # CHECK-ASM-AND-OBJ: bclrw t0, t1, t2
16 # CHECK-ASM: encoding: [0xbb,0x12,0x73,0x48]
17 bclrw t0, t1, t2
18 # CHECK-ASM-AND-OBJ: bsetw t0, t1, t2
19 # CHECK-ASM: encoding: [0xbb,0x12,0x73,0x28]
20 bsetw t0, t1, t2
21 # CHECK-ASM-AND-OBJ: binvw t0, t1, t2
22 # CHECK-ASM: encoding: [0xbb,0x12,0x73,0x68]
23 binvw t0, t1, t2
24 # CHECK-ASM-AND-OBJ: bextw t0, t1, t2
25 # CHECK-ASM: encoding: [0xbb,0x52,0x73,0x48]
26 bextw t0, t1, t2
27 # CHECK-ASM-AND-OBJ: bclriw t0, t1, 0
28 # CHECK-ASM: encoding: [0x9b,0x12,0x03,0x48]
29 bclriw t0, t1, 0
30 # CHECK-ASM-AND-OBJ: bsetiw t0, t1, 0
31 # CHECK-ASM: encoding: [0x9b,0x12,0x03,0x28]
32 bsetiw t0, t1, 0
33 # CHECK-ASM-AND-OBJ: binviw t0, t1, 0
34 # CHECK-ASM: encoding: [0x9b,0x12,0x03,0x68]
35 binviw t0, t1, 0