@@ -59,7 +59,7 @@ void __riscv_vwrite_csr(enum RVV_CSR __csr, unsigned long __value) {
59
59
}
60
60
}
61
61
}] in
62
- def xvread_xvwrite_csr : RVVHeader;
62
+ def th_vread_th_vwrite_csr : RVVHeader;
63
63
64
64
// vsetvl/vsetvlmax are a macro because they require constant integers in SEW
65
65
// and LMUL.
@@ -68,55 +68,55 @@ let HeaderCode =
68
68
69
69
/* These two builtins comes from the 1.0 implementation, */
70
70
/* for compatibility, we forward these calls to the corresponding 0.7 builtins. */
71
- #define __builtin_rvv_vsetvli(avl, sew, lmul) __builtin_rvv_xvsetvl ((size_t)(avl), sew, lmul)
72
- #define __builtin_rvv_vsetvlimax(sew, lmul) __builtin_rvv_xvsetvlmax (sew, lmul)
71
+ #define __builtin_rvv_vsetvli(avl, sew, lmul) __builtin_rvv_th_vsetvl ((size_t)(avl), sew, lmul)
72
+ #define __builtin_rvv_vsetvlimax(sew, lmul) __builtin_rvv_th_vsetvlmax (sew, lmul)
73
73
74
- #define __riscv_vsetvl_e8m1(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 0, 0)
75
- #define __riscv_vsetvl_e8m2(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 0, 1)
76
- #define __riscv_vsetvl_e8m4(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 0, 2)
77
- #define __riscv_vsetvl_e8m8(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 0, 3)
74
+ #define __riscv_vsetvl_e8m1(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 0, 0)
75
+ #define __riscv_vsetvl_e8m2(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 0, 1)
76
+ #define __riscv_vsetvl_e8m4(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 0, 2)
77
+ #define __riscv_vsetvl_e8m8(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 0, 3)
78
78
79
- #define __riscv_vsetvl_e16m1(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 1, 0)
80
- #define __riscv_vsetvl_e16m2(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 1, 1)
81
- #define __riscv_vsetvl_e16m4(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 1, 2)
82
- #define __riscv_vsetvl_e16m8(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 1, 3)
79
+ #define __riscv_vsetvl_e16m1(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 1, 0)
80
+ #define __riscv_vsetvl_e16m2(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 1, 1)
81
+ #define __riscv_vsetvl_e16m4(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 1, 2)
82
+ #define __riscv_vsetvl_e16m8(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 1, 3)
83
83
84
- #define __riscv_vsetvl_e32m1(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 2, 0)
85
- #define __riscv_vsetvl_e32m2(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 2, 1)
86
- #define __riscv_vsetvl_e32m4(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 2, 2)
87
- #define __riscv_vsetvl_e32m8(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 2, 3)
84
+ #define __riscv_vsetvl_e32m1(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 2, 0)
85
+ #define __riscv_vsetvl_e32m2(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 2, 1)
86
+ #define __riscv_vsetvl_e32m4(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 2, 2)
87
+ #define __riscv_vsetvl_e32m8(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 2, 3)
88
88
89
89
#if __riscv_v_elen >= 64
90
- #define __riscv_vsetvl_e64m1(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 3, 0)
91
- #define __riscv_vsetvl_e64m2(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 3, 1)
92
- #define __riscv_vsetvl_e64m4(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 3, 2)
93
- #define __riscv_vsetvl_e64m8(avl) __builtin_rvv_xvsetvl ((size_t)(avl), 3, 3)
90
+ #define __riscv_vsetvl_e64m1(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 3, 0)
91
+ #define __riscv_vsetvl_e64m2(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 3, 1)
92
+ #define __riscv_vsetvl_e64m4(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 3, 2)
93
+ #define __riscv_vsetvl_e64m8(avl) __builtin_rvv_th_vsetvl ((size_t)(avl), 3, 3)
94
94
#endif
95
95
96
- #define __riscv_vsetvlmax_e8m1() __builtin_rvv_xvsetvlmax (0, 0)
97
- #define __riscv_vsetvlmax_e8m2() __builtin_rvv_xvsetvlmax (0, 1)
98
- #define __riscv_vsetvlmax_e8m4() __builtin_rvv_xvsetvlmax (0, 2)
99
- #define __riscv_vsetvlmax_e8m8() __builtin_rvv_xvsetvlmax (0, 3)
96
+ #define __riscv_vsetvlmax_e8m1() __builtin_rvv_th_vsetvlmax (0, 0)
97
+ #define __riscv_vsetvlmax_e8m2() __builtin_rvv_th_vsetvlmax (0, 1)
98
+ #define __riscv_vsetvlmax_e8m4() __builtin_rvv_th_vsetvlmax (0, 2)
99
+ #define __riscv_vsetvlmax_e8m8() __builtin_rvv_th_vsetvlmax (0, 3)
100
100
101
- #define __riscv_vsetvlmax_e16m1() __builtin_rvv_xvsetvlmax (1, 0)
102
- #define __riscv_vsetvlmax_e16m2() __builtin_rvv_xvsetvlmax (1, 1)
103
- #define __riscv_vsetvlmax_e16m4() __builtin_rvv_xvsetvlmax (1, 2)
104
- #define __riscv_vsetvlmax_e16m8() __builtin_rvv_xvsetvlmax (1, 3)
101
+ #define __riscv_vsetvlmax_e16m1() __builtin_rvv_th_vsetvlmax (1, 0)
102
+ #define __riscv_vsetvlmax_e16m2() __builtin_rvv_th_vsetvlmax (1, 1)
103
+ #define __riscv_vsetvlmax_e16m4() __builtin_rvv_th_vsetvlmax (1, 2)
104
+ #define __riscv_vsetvlmax_e16m8() __builtin_rvv_th_vsetvlmax (1, 3)
105
105
106
- #define __riscv_vsetvlmax_e32m1() __builtin_rvv_xvsetvlmax (2, 0)
107
- #define __riscv_vsetvlmax_e32m2() __builtin_rvv_xvsetvlmax (2, 1)
108
- #define __riscv_vsetvlmax_e32m4() __builtin_rvv_xvsetvlmax (2, 2)
109
- #define __riscv_vsetvlmax_e32m8() __builtin_rvv_xvsetvlmax (2, 3)
106
+ #define __riscv_vsetvlmax_e32m1() __builtin_rvv_th_vsetvlmax (2, 0)
107
+ #define __riscv_vsetvlmax_e32m2() __builtin_rvv_th_vsetvlmax (2, 1)
108
+ #define __riscv_vsetvlmax_e32m4() __builtin_rvv_th_vsetvlmax (2, 2)
109
+ #define __riscv_vsetvlmax_e32m8() __builtin_rvv_th_vsetvlmax (2, 3)
110
110
111
111
#if __riscv_v_elen >= 64
112
- #define __riscv_vsetvlmax_e64m1() __builtin_rvv_xvsetvlmax (3, 0)
113
- #define __riscv_vsetvlmax_e64m2() __builtin_rvv_xvsetvlmax (3, 1)
114
- #define __riscv_vsetvlmax_e64m4() __builtin_rvv_xvsetvlmax (3, 2)
115
- #define __riscv_vsetvlmax_e64m8() __builtin_rvv_xvsetvlmax (3, 3)
112
+ #define __riscv_vsetvlmax_e64m1() __builtin_rvv_th_vsetvlmax (3, 0)
113
+ #define __riscv_vsetvlmax_e64m2() __builtin_rvv_th_vsetvlmax (3, 1)
114
+ #define __riscv_vsetvlmax_e64m4() __builtin_rvv_th_vsetvlmax (3, 2)
115
+ #define __riscv_vsetvlmax_e64m8() __builtin_rvv_th_vsetvlmax (3, 3)
116
116
#endif
117
117
118
118
}] in
119
- def xvsetvl_macro : RVVHeader;
119
+ def th_vsetvl_macro : RVVHeader;
120
120
121
121
let HasBuiltinAlias = false,
122
122
HasVL = false,
@@ -125,14 +125,14 @@ let HasBuiltinAlias = false,
125
125
Log2LMUL = [0],
126
126
ManualCodegen = [{IntrinsicTypes = {ResultType};}] in // Set XLEN type
127
127
{
128
- def xvsetvl : RVVBuiltin<"", "zzKzKz", "i">;
129
- def xvsetvlmax : RVVBuiltin<"", "zKzKz", "i">;
128
+ def th_vsetvl : RVVBuiltin<"", "zzKzKz", "i">;
129
+ def th_vsetvlmax : RVVBuiltin<"", "zKzKz", "i">;
130
130
}
131
131
132
132
//===----------------------------------------------------------------------===//
133
133
// 12. Vector Integer Arithmetic Instructions
134
134
//===----------------------------------------------------------------------===//
135
135
136
136
let UnMaskedPolicyScheme = HasPassthruOperand in {
137
- defm xvadd : RVVIntBinBuiltinSet;
137
+ defm th_vadd : RVVIntBinBuiltinSet;
138
138
}
0 commit comments