@@ -13,7 +13,11 @@ float test_default_parameter_type(half2 p1, half2 p2, float p3) {
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> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
16
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
17
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
18
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
19
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
20
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
17
21
// CHECK: ret float %[[RES]]
18
22
return dot2add (p1, p2, p3);
19
23
}
@@ -25,7 +29,11 @@ float test_float_arg2_type(half2 p1, float2 p2, float p3) {
25
29
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
26
30
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
27
31
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
28
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
32
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
33
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
34
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
35
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
36
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
29
37
// CHECK: ret float %[[RES]]
30
38
return dot2add (p1, p2, p3);
31
39
}
@@ -37,7 +45,11 @@ float test_float_arg1_type(float2 p1, half2 p2, float p3) {
37
45
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
38
46
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
39
47
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
40
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
48
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
49
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
50
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
51
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
52
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
41
53
// CHECK: ret float %[[RES]]
42
54
return dot2add (p1, p2, p3);
43
55
}
@@ -49,7 +61,11 @@ float test_double_arg3_type(half2 p1, half2 p2, double p3) {
49
61
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
50
62
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
51
63
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
52
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
64
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
65
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
66
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
67
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
68
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
53
69
// CHECK: ret float %[[RES]]
54
70
return dot2add (p1, p2, p3);
55
71
}
@@ -62,7 +78,11 @@ float test_float_arg1_arg2_type(float2 p1, float2 p2, float p3) {
62
78
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
63
79
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
64
80
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
65
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
81
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
82
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
83
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
84
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
85
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
66
86
// CHECK: ret float %[[RES]]
67
87
return dot2add (p1, p2, p3);
68
88
}
@@ -75,7 +95,11 @@ float test_double_arg1_arg2_type(double2 p1, double2 p2, float p3) {
75
95
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
76
96
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
77
97
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
78
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
98
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
99
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
100
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
101
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
102
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
79
103
// CHECK: ret float %[[RES]]
80
104
return dot2add (p1, p2, p3);
81
105
}
@@ -88,7 +112,11 @@ float test_int16_arg1_arg2_type(int16_t2 p1, int16_t2 p2, float p3) {
88
112
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
89
113
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
90
114
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
91
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
115
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
116
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
117
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
118
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
119
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
92
120
// CHECK: ret float %[[RES]]
93
121
return dot2add (p1, p2, p3);
94
122
}
@@ -101,7 +129,11 @@ float test_int32_arg1_arg2_type(int32_t2 p1, int32_t2 p2, float p3) {
101
129
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
102
130
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
103
131
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
104
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
132
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
133
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
134
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
135
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
136
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
105
137
// CHECK: ret float %[[RES]]
106
138
return dot2add (p1, p2, p3);
107
139
}
@@ -114,7 +146,11 @@ float test_int64_arg1_arg2_type(int64_t2 p1, int64_t2 p2, float p3) {
114
146
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
115
147
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
116
148
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
117
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
149
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
150
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
151
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
152
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
153
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
118
154
// CHECK: ret float %[[RES]]
119
155
return dot2add (p1, p2, p3);
120
156
}
@@ -129,7 +165,11 @@ float test_bool_arg1_arg2_type(bool2 p1, bool2 p2, float p3) {
129
165
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
130
166
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
131
167
// CHECK-SPIRV: %[[RES:.*]] = fadd reassoc nnan ninf nsz arcp afn float %[[CONV]], %[[C]]
132
- // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, float %{{.*}})
168
+ // CHECK-DXIL: %[[AX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
169
+ // CHECK-DXIL: %[[AY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
170
+ // CHECK-DXIL: %[[BX:.*]] = extractelement <2 x half> %{{.*}}, i32 0
171
+ // CHECK-DXIL: %[[BY:.*]] = extractelement <2 x half> %{{.*}}, i32 1
172
+ // CHECK-DXIL: %[[RES:.*]] = call {{.*}} float @llvm.dx.dot2add(float %{{.*}}, half %[[AX]], half %[[AY]], half %[[BX]], half %[[BY]])
133
173
// CHECK: ret float %[[RES]]
134
174
return dot2add (p1, p2, p3);
135
175
}
0 commit comments