@@ -117,45 +117,37 @@ void test_mov_dpp_long(long x, global long *p) {
117117}
118118
119119// CHECK-LABEL: @test_mov_dpp_float
120- // CHECK: %0 = bitcast float %x to i32
121- // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %0, i32 257, i32 15, i32 15, i1 false)
122- // CHECK-NEXT: store i32 %1,
120+ // CHECK: %0 = tail call{{.*}} float @llvm.amdgcn.update.dpp.f32(float poison, float %x, i32 257, i32 15, i32 15, i1 false)
121+ // CHECK-NEXT: store float %0,
123122void test_mov_dpp_float (float x , global float * p ) {
124123 * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
125124}
126125
127126// CHECK-LABEL: @test_mov_dpp_double
128- // CHECK: %0 = bitcast double %x to i64
129- // CHECK-NEXT: %1 = tail call{{.*}} i64 @llvm.amdgcn.update.dpp.i64(i64 poison, i64 %0, i32 257, i32 15, i32 15, i1 false)
130- // CHECK-NEXT: store i64 %1,
127+ // CHECK: %0 = tail call{{.*}} double @llvm.amdgcn.update.dpp.f64(double poison, double %x, i32 257, i32 15, i32 15, i1 false)
128+ // CHECK-NEXT: store double %0,
131129void test_mov_dpp_double (double x , global double * p ) {
132130 * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
133131}
134132
135133// CHECK-LABEL: @test_mov_dpp_short
136- // CHECK: %0 = zext i16 %x to i32
137- // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %0, i32 257, i32 15, i32 15, i1 false)
138- // CHECK-NEXT: %2 = trunc i32 %1 to i16
139- // CHECK-NEXT: store i16 %2,
134+ // CHECK: %0 = tail call{{.*}} i16 @llvm.amdgcn.update.dpp.i16(i16 poison, i16 %x, i32 257, i32 15, i32 15, i1 false)
135+ // CHECK-NEXT: store i16 %0,
140136void test_mov_dpp_short (short x , global short * p ) {
141137 * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
142138}
143139
144140// CHECK-LABEL: @test_mov_dpp_char
145- // CHECK: %0 = zext i8 %x to i32
146- // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %0, i32 257, i32 15, i32 15, i1 false)
147- // CHECK-NEXT: %2 = trunc i32 %1 to i8
148- // CHECK-NEXT: store i8 %2,
141+ // CHECK: %0 = tail call{{.*}} i8 @llvm.amdgcn.update.dpp.i8(i8 poison, i8 %x, i32 257, i32 15, i32 15, i1 false)
142+ // CHECK-NEXT: store i8 %0,
149143void test_mov_dpp_char (char x , global char * p ) {
150144 * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
151145}
152146
153147// CHECK-LABEL: @test_mov_dpp_half
154- // CHECK: %0 = load i16,
155- // CHECK: %1 = zext i16 %0 to i32
156- // CHECK-NEXT: %2 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %1, i32 257, i32 15, i32 15, i1 false)
157- // CHECK-NEXT: %3 = trunc i32 %2 to i16
158- // CHECK-NEXT: store i16 %3,
148+ // CHECK: %0 = load half,
149+ // CHECK-NEXT: %1 = tail call{{.*}} half @llvm.amdgcn.update.dpp.f16(half poison, half %0, i32 257, i32 15, i32 15, i1 false)
150+ // CHECK-NEXT: store half %1,
159151void test_mov_dpp_half (half * x , global half * p ) {
160152 * p = __builtin_amdgcn_mov_dpp (* x , 0x101 , 0xf , 0xf , 0 );
161153}
@@ -175,45 +167,37 @@ void test_update_dpp_long(long x, global long *p) {
175167}
176168
177169// CHECK-LABEL: @test_update_dpp_float
178- // CHECK: %0 = bitcast float %x to i32
179- // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %0, i32 257, i32 15, i32 15, i1 false)
180- // CHECK-NEXT: store i32 %1,
170+ // CHECK: %0 = tail call{{.*}} float @llvm.amdgcn.update.dpp.f32(float %x, float %x, i32 257, i32 15, i32 15, i1 false)
171+ // CHECK-NEXT: store float %0,
181172void test_update_dpp_float (float x , global float * p ) {
182173 * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
183174}
184175
185176// CHECK-LABEL: @test_update_dpp_double
186- // CHECK: %0 = bitcast double %x to i64
187- // CHECK-NEXT: %1 = tail call{{.*}} i64 @llvm.amdgcn.update.dpp.i64(i64 %0, i64 %0, i32 257, i32 15, i32 15, i1 false)
188- // CHECK-NEXT: store i64 %1,
177+ // CHECK: %0 = tail call{{.*}} double @llvm.amdgcn.update.dpp.f64(double %x, double %x, i32 257, i32 15, i32 15, i1 false)
178+ // CHECK-NEXT: store double %0,
189179void test_update_dpp_double (double x , global double * p ) {
190180 * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
191181}
192182
193183// CHECK-LABEL: @test_update_dpp_short
194- // CHECK: %0 = zext i16 %x to i32
195- // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %0, i32 257, i32 15, i32 15, i1 false)
196- // CHECK-NEXT: %2 = trunc i32 %1 to i16
197- // CHECK-NEXT: store i16 %2,
184+ // CHECK: %0 = tail call{{.*}} i16 @llvm.amdgcn.update.dpp.i16(i16 %x, i16 %x, i32 257, i32 15, i32 15, i1 false)
185+ // CHECK-NEXT: store i16 %0,
198186void test_update_dpp_short (short x , global short * p ) {
199187 * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
200188}
201189
202190// CHECK-LABEL: @test_update_dpp_char
203- // CHECK: %0 = zext i8 %x to i32
204- // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %0, i32 257, i32 15, i32 15, i1 false)
205- // CHECK-NEXT: %2 = trunc i32 %1 to i8
206- // CHECK-NEXT: store i8 %2,
191+ // CHECK: %0 = tail call{{.*}} i8 @llvm.amdgcn.update.dpp.i8(i8 %x, i8 %x, i32 257, i32 15, i32 15, i1 false)
192+ // CHECK-NEXT: store i8 %0,
207193void test_update_dpp_char (char x , global char * p ) {
208194 * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
209195}
210196
211197// CHECK-LABEL: @test_update_dpp_half
212- // CHECK: %0 = load i16,
213- // CHECK: %1 = zext i16 %0 to i32
214- // CHECK-NEXT: %2 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 %1, i32 %1, i32 257, i32 15, i32 15, i1 false)
215- // CHECK-NEXT: %3 = trunc i32 %2 to i16
216- // CHECK-NEXT: store i16 %3,
198+ // CHECK: %0 = load half,
199+ // CHECK-NEXT: %1 = tail call{{.*}} half @llvm.amdgcn.update.dpp.f16(half %0, half %0, i32 257, i32 15, i32 15, i1 false)
200+ // CHECK-NEXT: store half %1,
217201void test_update_dpp_half (half * x , global half * p ) {
218202 * p = __builtin_amdgcn_update_dpp (* x , * x , 0x101 , 0xf , 0xf , 0 );
219203}
0 commit comments