[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv32zbp-only-valid.s
blobd2f11872172b6e6e90354be0a5c4515abae717d2
1 # With B extension:
2 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-b -show-encoding \
3 # RUN: | FileCheck -check-prefix=CHECK-ASM %s
4 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-b < %s \
5 # RUN: | llvm-objdump --mattr=+experimental-b -d -r - \
6 # RUN: | FileCheck --check-prefix=CHECK-OBJ %s
8 # With Bitmanip permutation extension:
9 # RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-zbp -show-encoding \
10 # RUN: | FileCheck -check-prefix=CHECK-ASM %s
11 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+experimental-zbp < %s \
12 # RUN: | llvm-objdump --mattr=+experimental-zbp -d -r - \
13 # RUN: | FileCheck --check-prefix=CHECK-OBJ %s
15 # CHECK-ASM: pack t0, t1, zero
16 # CHECK-OBJ: zext.h t0, t1
17 # CHECK-ASM: encoding: [0xb3,0x42,0x03,0x08]
18 pack t0, t1, x0
19 # CHECK-ASM: grevi t0, t1, 24
20 # CHECK-OBJ: rev8 t0, t1
21 # CHECK-ASM: encoding: [0x93,0x52,0x83,0x69]
22 grevi t0, t1, 24