[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv64zbr-valid.s
blobf1ff120c9d836cf9a40b1ce802a0cf866cb94ddd
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 CRC extension:
9 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-zbr -show-encoding \
10 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
11 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+experimental-zbr < %s \
12 # RUN: | llvm-objdump --mattr=+experimental-zbr -d -r - \
13 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
15 # CHECK-ASM-AND-OBJ: crc32.b t0, t1
16 # CHECK-ASM: encoding: [0x93,0x12,0x03,0x61]
17 crc32.b t0, t1
18 # CHECK-ASM-AND-OBJ: crc32.h t0, t1
19 # CHECK-ASM: encoding: [0x93,0x12,0x13,0x61]
20 crc32.h t0, t1
21 # CHECK-ASM-AND-OBJ: crc32.w t0, t1
22 # CHECK-ASM: encoding: [0x93,0x12,0x23,0x61]
23 crc32.w t0, t1
24 # CHECK-ASM-AND-OBJ: crc32c.b t0, t1
25 # CHECK-ASM: encoding: [0x93,0x12,0x83,0x61]
26 crc32c.b t0, t1
27 # CHECK-ASM-AND-OBJ: crc32c.h t0, t1
28 # CHECK-ASM: encoding: [0x93,0x12,0x93,0x61]
29 crc32c.h t0, t1
30 # CHECK-ASM-AND-OBJ: crc32c.w t0, t1
31 # CHECK-ASM: encoding: [0x93,0x12,0xa3,0x61]
32 crc32c.w t0, t1
33 # CHECK-ASM-AND-OBJ: crc32.d t0, t1
34 # CHECK-ASM: encoding: [0x93,0x12,0x33,0x61]
35 crc32.d t0, t1
36 # CHECK-ASM-AND-OBJ: crc32c.d t0, t1
37 # CHECK-ASM: encoding: [0x93,0x12,0xb3,0x61]
38 crc32c.d t0, t1