[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv32zbt-valid.s
blob7a039bc05185da06542a614fff53d40aaed39eef
1 # With B extension:
2 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
3 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
4 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -show-encoding \
5 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
6 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
7 # RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
8 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
9 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-b < %s \
10 # RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
11 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
13 # With Bitmanip ternary extension:
14 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbt -show-encoding \
15 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
16 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbt -show-encoding \
17 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
18 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbt < %s \
19 # RUN: | llvm-objdump --mattr=+experimental-zbt -d -r - \
20 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
21 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbt < %s \
22 # RUN: | llvm-objdump --mattr=+experimental-zbt -d -r - \
23 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
25 # CHECK-ASM-AND-OBJ: cmix t0, t1, t2, t3
26 # CHECK-ASM: encoding: [0xb3,0x92,0x63,0xe6]
27 cmix t0, t1, t2, t3
28 # CHECK-ASM-AND-OBJ: cmov t0, t1, t2, t3
29 # CHECK-ASM: encoding: [0xb3,0xd2,0x63,0xe6]
30 cmov t0, t1, t2, t3
31 # CHECK-ASM-AND-OBJ: fsl t0, t1, t2, t3
32 # CHECK-ASM: encoding: [0xb3,0x12,0xc3,0x3d]
33 fsl t0, t1, t2, t3
34 # CHECK-ASM-AND-OBJ: fsr t0, t1, t2, t3
35 # CHECK-ASM: encoding: [0xb3,0x52,0xc3,0x3d]
36 fsr t0, t1, t2, t3
37 # CHECK-ASM-AND-OBJ: fsri t0, t1, t2, 0
38 # CHECK-ASM: encoding: [0x93,0x52,0x03,0x3c]
39 fsri t0, t1, t2, 0