[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rvv-user-csr-names.s
blob35651c540ec6d225cce87065598f1bec1b9a5ffd
1 # RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+f -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+v < %s \
4 # RUN: | llvm-objdump -d --mattr=+v - \
5 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
7 # RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -mattr=+f -show-encoding \
8 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
9 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+v < %s \
10 # RUN: | llvm-objdump -d --mattr=+v - \
11 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
13 ##################################
14 # User Vector CSRs
15 ##################################
17 # vstart
18 # name
19 # CHECK-INST: csrrs t1, vstart, zero
20 # CHECK-ENC: encoding: [0x73,0x23,0x80,0x00]
21 # CHECK-INST-ALIAS: csrr t1, vstart
22 # uimm12
23 # CHECK-INST: csrrs t2, vstart, zero
24 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0x00]
25 # CHECK-INST-ALIAS: csrr t2, vstart
26 # name
27 csrrs t1, vstart, zero
28 # uimm12
29 csrrs t2, 0x008, zero
31 # vxsat
32 # name
33 # CHECK-INST: csrrs t1, vxsat, zero
34 # CHECK-ENC: encoding: [0x73,0x23,0x90,0x00]
35 # CHECK-INST-ALIAS: csrr t1, vxsat
36 # uimm12
37 # CHECK-INST: csrrs t2, vxsat, zero
38 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0x00]
39 # CHECK-INST-ALIAS: csrr t2, vxsat
40 # name
41 csrrs t1, vxsat, zero
42 # uimm12
43 csrrs t2, 0x009, zero
45 # vxrm
46 # name
47 # CHECK-INST: csrrs t1, vxrm, zero
48 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0x00]
49 # CHECK-INST-ALIAS: csrr t1, vxrm
50 # uimm12
51 # CHECK-INST: csrrs t2, vxrm, zero
52 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0x00]
53 # CHECK-INST-ALIAS: csrr t2, vxrm
54 # name
55 csrrs t1, vxrm, zero
56 # uimm12
57 csrrs t2, 0x00a, zero
59 # vl
60 # name
61 # CHECK-INST: csrrs t1, vl, zero
62 # CHECK-ENC: encoding: [0x73,0x23,0x00,0xc2]
63 # CHECK-INST-ALIAS: csrr t1, vl
64 # uimm12
65 # CHECK-INST: csrrs t2, vl, zero
66 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xc2]
67 # CHECK-INST-ALIAS: csrr t2, vl
68 # name
69 csrrs t1, vl, zero
70 # uimm12
71 csrrs t2, 0xc20, zero
73 # vtype
74 # name
75 # CHECK-INST: csrrs t1, vtype, zero
76 # CHECK-ENC: encoding: [0x73,0x23,0x10,0xc2]
77 # CHECK-INST-ALIAS: csrr t1, vtype
78 # uimm12
79 # CHECK-INST: csrrs t2, vtype, zero
80 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0xc2]
81 # CHECK-INST-ALIAS: csrr t2, vtype
82 # name
83 csrrs t1, vtype, zero
84 # uimm12
85 csrrs t2, 0xc21, zero
87 # vlenb
88 # name
89 # CHECK-INST: csrrs t1, vlenb, zero
90 # CHECK-ENC: encoding: [0x73,0x23,0x20,0xc2]
91 # CHECK-INST-ALIAS: csrr t1, vlenb
92 # uimm12
93 # CHECK-INST: csrrs t2, vlenb, zero
94 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xc2]
95 # CHECK-INST-ALIAS: csrr t2, vlenb
96 # name
97 csrrs t1, vlenb, zero
98 # uimm12
99 csrrs t2, 0xc22, zero