@@ -102,20 +102,66 @@ void test_s_dcache_wb()
102102 __builtin_amdgcn_s_dcache_wb ();
103103}
104104
105- // CHECK-LABEL: @test_mov_dpp
105+ // CHECK-LABEL: @test_mov_dpp_int
106106// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %src, i32 0, i32 0, i32 0, i1 false)
107- void test_mov_dpp (global int * out , int src )
107+ void test_mov_dpp_int (global int * out , int src )
108108{
109109 * out = __builtin_amdgcn_mov_dpp (src , 0 , 0 , 0 , false);
110110}
111111
112- // CHECK-LABEL: @test_update_dpp
112+ // CHECK-LABEL: @test_mov_dpp_long
113+ // CHECK: %0 = tail call{{.*}} i64 @llvm.amdgcn.update.dpp.i64(i64 poison, i64 %x, i32 257, i32 15, i32 15, i1 false)
114+ // CHECK-NEXT: store i64 %0,
115+ void test_mov_dpp_long (long x , global long * p ) {
116+ * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
117+ }
118+
119+ // 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,
123+ void test_mov_dpp_float (float x , global float * p ) {
124+ * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
125+ }
126+
127+ // 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,
131+ void test_mov_dpp_double (double x , global double * p ) {
132+ * p = __builtin_amdgcn_mov_dpp (x , 0x101 , 0xf , 0xf , 0 );
133+ }
134+
135+ // CHECK-LABEL: @test_update_dpp_int
113136// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 %arg1, i32 %arg2, i32 0, i32 0, i32 0, i1 false)
114- void test_update_dpp (global int * out , int arg1 , int arg2 )
137+ void test_update_dpp_int (global int * out , int arg1 , int arg2 )
115138{
116139 * out = __builtin_amdgcn_update_dpp (arg1 , arg2 , 0 , 0 , 0 , false);
117140}
118141
142+ // CHECK-LABEL: @test_update_dpp_long
143+ // CHECK: %0 = tail call{{.*}} i64 @llvm.amdgcn.update.dpp.i64(i64 %x, i64 %x, i32 257, i32 15, i32 15, i1 false)
144+ // CHECk-NEXT: store i64 %0,
145+ void test_update_dpp_long (long x , global long * p ) {
146+ * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
147+ }
148+
149+ // CHECK-LABEL: @test_update_dpp_float
150+ // CHECK: %0 = bitcast float %x to i32
151+ // CHECK-NEXT: %1 = tail call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 %0, i32 %0, i32 257, i32 15, i32 15, i1 false)
152+ // CHECK-NEXT: store i32 %1,
153+ void test_update_dpp_float (float x , global float * p ) {
154+ * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
155+ }
156+
157+ // CHECK-LABEL: @test_update_dpp_double
158+ // CHECK: %0 = bitcast double %x to i64
159+ // CHECK-NEXT: %1 = tail call{{.*}} i64 @llvm.amdgcn.update.dpp.i64(i64 %0, i64 %0, i32 257, i32 15, i32 15, i1 false)
160+ // CHECK-NEXT: store i64 %1,
161+ void test_update_dpp_double (double x , global double * p ) {
162+ * p = __builtin_amdgcn_update_dpp (x , x , 0x101 , 0xf , 0xf , 0 );
163+ }
164+
119165// CHECK-LABEL: @test_ds_fadd
120166// CHECK: atomicrmw fadd ptr addrspace(3) %out, float %src monotonic, align 4{{$}}
121167// CHECK: atomicrmw volatile fadd ptr addrspace(3) %out, float %src monotonic, align 4{{$}}
0 commit comments