|
9 | 9 |
|
10 | 10 | // CHECK-LABEL: define {{.*}}test_default_parameter_type
|
11 | 11 | float test_default_parameter_type(half2 p1, half2 p2, float p3) {
|
12 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 12 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
13 | 13 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
14 | 14 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
15 | 15 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
16 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 16 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
17 | 17 | // CHECK: ret float %[[RES]]
|
18 | 18 | return dot2add(p1, p2, p3);
|
19 | 19 | }
|
20 | 20 |
|
21 | 21 | // CHECK-LABEL: define {{.*}}test_float_arg2_type
|
22 | 22 | float test_float_arg2_type(half2 p1, float2 p2, float p3) {
|
23 |
| - // CHECK-SPIRV: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %2 to <2 x half> |
24 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 23 | + // CHECK: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %{{.*}} to <2 x half> |
| 24 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
25 | 25 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
26 | 26 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
27 | 27 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
28 |
| - // CHECK-DXIL: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %1 to <2 x half> |
29 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 28 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
30 | 29 | // CHECK: ret float %[[RES]]
|
31 | 30 | return dot2add(p1, p2, p3);
|
32 | 31 | }
|
33 | 32 |
|
34 | 33 | // CHECK-LABEL: define {{.*}}test_float_arg1_type
|
35 | 34 | float test_float_arg1_type(float2 p1, half2 p2, float p3) {
|
36 |
| - // CHECK-SPIRV: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %1 to <2 x half> |
37 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 35 | + // CHECK: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %{{.*}} to <2 x half> |
| 36 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
38 | 37 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
39 | 38 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
40 | 39 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
41 |
| - // CHECK-DXIL: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %0 to <2 x half> |
42 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 40 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
43 | 41 | // CHECK: ret float %[[RES]]
|
44 | 42 | return dot2add(p1, p2, p3);
|
45 | 43 | }
|
46 | 44 |
|
47 | 45 | // CHECK-LABEL: define {{.*}}test_double_arg3_type
|
48 | 46 | float test_double_arg3_type(half2 p1, half2 p2, double p3) {
|
49 |
| - // CHECK-SPIRV: %conv = fptrunc reassoc nnan ninf nsz arcp afn double %3 to float |
50 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 47 | + // CHECK: %conv = fptrunc reassoc nnan ninf nsz arcp afn double %{{.*}} to float |
| 48 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
51 | 49 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
52 | 50 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
53 | 51 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
54 |
| - // CHECK-DXIL: %conv = fptrunc reassoc nnan ninf nsz arcp afn double %2 to float |
55 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 52 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
56 | 53 | // CHECK: ret float %[[RES]]
|
57 | 54 | return dot2add(p1, p2, p3);
|
58 | 55 | }
|
59 | 56 |
|
60 | 57 | // CHECK-LABEL: define {{.*}}test_float_arg1_arg2_type
|
61 | 58 | float test_float_arg1_arg2_type(float2 p1, float2 p2, float p3) {
|
62 |
| - // CHECK-SPIRV: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %1 to <2 x half> |
63 |
| - // CHECK-SPIRV: %conv1 = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %2 to <2 x half> |
64 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 59 | + // CHECK: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %{{.*}} to <2 x half> |
| 60 | + // CHECK: %conv1 = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %{{.*}} to <2 x half> |
| 61 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
65 | 62 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
66 | 63 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
67 | 64 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
68 |
| - // CHECK-DXIL: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %0 to <2 x half> |
69 |
| - // CHECK-DXIL: %conv1 = fptrunc reassoc nnan ninf nsz arcp afn <2 x float> %1 to <2 x half> |
70 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 65 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
71 | 66 | // CHECK: ret float %[[RES]]
|
72 | 67 | return dot2add(p1, p2, p3);
|
73 | 68 | }
|
74 | 69 |
|
75 | 70 | // CHECK-LABEL: define {{.*}}test_double_arg1_arg2_type
|
76 | 71 | float test_double_arg1_arg2_type(double2 p1, double2 p2, float p3) {
|
77 |
| - // CHECK-SPIRV: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x double> %1 to <2 x half> |
78 |
| - // CHECK-SPIRV: %conv1 = fptrunc reassoc nnan ninf nsz arcp afn <2 x double> %2 to <2 x half> |
79 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 72 | + // CHECK: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x double> %{{.*}} to <2 x half> |
| 73 | + // CHECK: %conv1 = fptrunc reassoc nnan ninf nsz arcp afn <2 x double> %{{.*}} to <2 x half> |
| 74 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
80 | 75 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
81 | 76 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
82 | 77 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
83 |
| - // CHECK-DXIL: %conv = fptrunc reassoc nnan ninf nsz arcp afn <2 x double> %0 to <2 x half> |
84 |
| - // CHECK-DXIL: %conv1 = fptrunc reassoc nnan ninf nsz arcp afn <2 x double> %1 to <2 x half> |
85 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 78 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
86 | 79 | // CHECK: ret float %[[RES]]
|
87 | 80 | return dot2add(p1, p2, p3);
|
88 | 81 | }
|
89 | 82 |
|
90 | 83 | // CHECK-LABEL: define {{.*}}test_int16_arg1_arg2_type
|
91 | 84 | float test_int16_arg1_arg2_type(int16_t2 p1, int16_t2 p2, float p3) {
|
92 |
| - // CHECK-SPIRV: %conv = sitofp <2 x i16> %1 to <2 x half> |
93 |
| - // CHECK-SPIRV: %conv1 = sitofp <2 x i16> %2 to <2 x half> |
94 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 85 | + // CHECK: %conv = sitofp <2 x i16> %{{.*}} to <2 x half> |
| 86 | + // CHECK: %conv1 = sitofp <2 x i16> %{{.*}} to <2 x half> |
| 87 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
95 | 88 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
96 | 89 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
97 | 90 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
98 |
| - // CHECK-DXIL: %conv = sitofp <2 x i16> %0 to <2 x half> |
99 |
| - // CHECK-DXIL: %conv1 = sitofp <2 x i16> %1 to <2 x half> |
100 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 91 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
101 | 92 | // CHECK: ret float %[[RES]]
|
102 | 93 | return dot2add(p1, p2, p3);
|
103 | 94 | }
|
104 | 95 |
|
105 | 96 | // CHECK-LABEL: define {{.*}}test_int32_arg1_arg2_type
|
106 | 97 | float test_int32_arg1_arg2_type(int32_t2 p1, int32_t2 p2, float p3) {
|
107 |
| - // CHECK-SPIRV: %conv = sitofp <2 x i32> %1 to <2 x half> |
108 |
| - // CHECK-SPIRV: %conv1 = sitofp <2 x i32> %2 to <2 x half> |
109 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 98 | + // CHECK: %conv = sitofp <2 x i32> %{{.*}} to <2 x half> |
| 99 | + // CHECK: %conv1 = sitofp <2 x i32> %{{.*}} to <2 x half> |
| 100 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
110 | 101 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
111 | 102 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
112 | 103 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
113 |
| - // CHECK-DXIL: %conv = sitofp <2 x i32> %0 to <2 x half> |
114 |
| - // CHECK-DXIL: %conv1 = sitofp <2 x i32> %1 to <2 x half> |
115 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 104 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
116 | 105 | // CHECK: ret float %[[RES]]
|
117 | 106 | return dot2add(p1, p2, p3);
|
118 | 107 | }
|
119 | 108 |
|
120 | 109 | // CHECK-LABEL: define {{.*}}test_int64_arg1_arg2_type
|
121 | 110 | float test_int64_arg1_arg2_type(int64_t2 p1, int64_t2 p2, float p3) {
|
122 |
| - // CHECK-SPIRV: %conv = sitofp <2 x i64> %1 to <2 x half> |
123 |
| - // CHECK-SPIRV: %conv1 = sitofp <2 x i64> %2 to <2 x half> |
124 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %7, <2 x half> %8) |
| 111 | + // CHECK: %conv = sitofp <2 x i64> %{{.*}} to <2 x half> |
| 112 | + // CHECK: %conv1 = sitofp <2 x i64> %{{.*}} to <2 x half> |
| 113 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
125 | 114 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
126 | 115 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
127 | 116 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
128 |
| - // CHECK-DXIL: %conv = sitofp <2 x i64> %0 to <2 x half> |
129 |
| - // CHECK-DXIL: %conv1 = sitofp <2 x i64> %1 to <2 x half> |
130 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %6, <2 x half> %7, float %8) |
| 117 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
131 | 118 | // CHECK: ret float %[[RES]]
|
132 | 119 | return dot2add(p1, p2, p3);
|
133 | 120 | }
|
134 | 121 |
|
135 | 122 | // CHECK-LABEL: define {{.*}}test_bool_arg1_arg2_type
|
136 | 123 | float test_bool_arg1_arg2_type(bool2 p1, bool2 p2, float p3) {
|
137 |
| - // CHECK-SPIRV: %loadedv = trunc <2 x i32> %3 to <2 x i1> |
138 |
| - // CHECK-SPIRV: %conv = uitofp <2 x i1> %loadedv to <2 x half> |
139 |
| - // CHECK-SPIRV: %loadedv1 = trunc <2 x i32> %4 to <2 x i1> |
140 |
| - // CHECK-SPIRV: %conv2 = uitofp <2 x i1> %loadedv1 to <2 x half> |
141 |
| - // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %9, <2 x half> %10) |
| 124 | + // CHECK: %loadedv = trunc <2 x i32> %{{.*}} to <2 x i1> |
| 125 | + // CHECK: %conv = uitofp <2 x i1> %loadedv to <2 x half> |
| 126 | + // CHECK: %loadedv1 = trunc <2 x i32> %{{.*}} to <2 x i1> |
| 127 | + // CHECK: %conv2 = uitofp <2 x i1> %loadedv1 to <2 x half> |
| 128 | + // CHECK-SPIRV: %[[MUL:.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.spv.fdot.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}) |
142 | 129 | // CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
|
143 | 130 | // CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
|
144 | 131 | // CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
|
145 |
| - // CHECK-DXIL: %loadedv = trunc <2 x i32> %2 to <2 x i1> |
146 |
| - // CHECK-DXIL: %conv = uitofp <2 x i1> %loadedv to <2 x half> |
147 |
| - // CHECK-DXIL: %loadedv1 = trunc <2 x i32> %3 to <2 x i1> |
148 |
| - // CHECK-DXIL: %conv2 = uitofp <2 x i1> %loadedv1 to <2 x half> |
149 |
| - // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %8, <2 x half> %9, float %10) |
| 132 | + // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}}) |
150 | 133 | // CHECK: ret float %[[RES]]
|
151 | 134 | return dot2add(p1, p2, p3);
|
152 | 135 | }
|
0 commit comments