Skip to content

Commit f17167f

Browse files
committed
remove specific register from expected output
1 parent e2dc249 commit f17167f

File tree

1 file changed

+37
-54
lines changed

1 file changed

+37
-54
lines changed

clang/test/CodeGenHLSL/builtins/dot2add.hlsl

Lines changed: 37 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,144 +9,127 @@
99

1010
// CHECK-LABEL: define {{.*}}test_default_parameter_type
1111
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> %{{.*}})
1313
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
1414
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
1515
// 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 %{{.*}})
1717
// CHECK: ret float %[[RES]]
1818
return dot2add(p1, p2, p3);
1919
}
2020

2121
// CHECK-LABEL: define {{.*}}test_float_arg2_type
2222
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> %{{.*}})
2525
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
2626
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
2727
// 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 %{{.*}})
3029
// CHECK: ret float %[[RES]]
3130
return dot2add(p1, p2, p3);
3231
}
3332

3433
// CHECK-LABEL: define {{.*}}test_float_arg1_type
3534
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> %{{.*}})
3837
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
3938
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
4039
// 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 %{{.*}})
4341
// CHECK: ret float %[[RES]]
4442
return dot2add(p1, p2, p3);
4543
}
4644

4745
// CHECK-LABEL: define {{.*}}test_double_arg3_type
4846
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> %{{.*}})
5149
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
5250
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
5351
// 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 %{{.*}})
5653
// CHECK: ret float %[[RES]]
5754
return dot2add(p1, p2, p3);
5855
}
5956

6057
// CHECK-LABEL: define {{.*}}test_float_arg1_arg2_type
6158
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> %{{.*}})
6562
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
6663
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
6764
// 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 %{{.*}})
7166
// CHECK: ret float %[[RES]]
7267
return dot2add(p1, p2, p3);
7368
}
7469

7570
// CHECK-LABEL: define {{.*}}test_double_arg1_arg2_type
7671
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> %{{.*}})
8075
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
8176
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
8277
// 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 %{{.*}})
8679
// CHECK: ret float %[[RES]]
8780
return dot2add(p1, p2, p3);
8881
}
8982

9083
// CHECK-LABEL: define {{.*}}test_int16_arg1_arg2_type
9184
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> %{{.*}})
9588
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
9689
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
9790
// 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 %{{.*}})
10192
// CHECK: ret float %[[RES]]
10293
return dot2add(p1, p2, p3);
10394
}
10495

10596
// CHECK-LABEL: define {{.*}}test_int32_arg1_arg2_type
10697
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> %{{.*}})
110101
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
111102
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
112103
// 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 %{{.*}})
116105
// CHECK: ret float %[[RES]]
117106
return dot2add(p1, p2, p3);
118107
}
119108

120109
// CHECK-LABEL: define {{.*}}test_int64_arg1_arg2_type
121110
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> %{{.*}})
125114
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
126115
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
127116
// 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 %{{.*}})
131118
// CHECK: ret float %[[RES]]
132119
return dot2add(p1, p2, p3);
133120
}
134121

135122
// CHECK-LABEL: define {{.*}}test_bool_arg1_arg2_type
136123
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> %{{.*}})
142129
// CHECK-SPIRV: %[[CONV:.*]] = fpext reassoc nnan ninf nsz arcp afn half %[[MUL]] to float
143130
// CHECK-SPIRV: %[[C:.*]] = load float, ptr %c.addr.i, align 4
144131
// 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 %{{.*}})
150133
// CHECK: ret float %[[RES]]
151134
return dot2add(p1, p2, p3);
152135
}

0 commit comments

Comments
 (0)