Author: Roman Lebedev Date: 2021-07-09T14:16:54+03:00 New Revision: 329f8197ef59f9bd23328b52d623ba768b51dbb2
URL: https://github.com/llvm/llvm-project/commit/329f8197ef59f9bd23328b52d623ba768b51dbb2 DIFF: https://github.com/llvm/llvm-project/commit/329f8197ef59f9bd23328b52d623ba768b51dbb2.diff LOG: [NFC][Clang][CodegenOpenCL] Fix test not to rely on volatile store not being removed Added: Modified: clang/test/CodeGenOpenCL/convergent.cl Removed: ################################################################################ diff --git a/clang/test/CodeGenOpenCL/convergent.cl b/clang/test/CodeGenOpenCL/convergent.cl index 1905d7dd81aa..a69b3d784e8c 100644 --- a/clang/test/CodeGenOpenCL/convergent.cl +++ b/clang/test/CodeGenOpenCL/convergent.cl @@ -3,11 +3,10 @@ // This is initially assumed convergent, but can be deduced to not require it. -// CHECK-LABEL: define{{.*}} spir_func void @non_convfun() local_unnamed_addr #0 +// CHECK-LABEL: define{{.*}} spir_func void @non_convfun(i32* %p) local_unnamed_addr #0 // CHECK: ret void __attribute__((noinline)) -void non_convfun(void) { - volatile int* p; +void non_convfun(volatile int* p) { *p = 0; } @@ -28,29 +27,29 @@ void g(void); // non_convfun(); // } // -// CHECK-LABEL: define{{.*}} spir_func void @test_merge_if(i32 %a) local_unnamed_addr #1 { +// CHECK-LABEL: define{{.*}} spir_func void @test_merge_if(i32 %a, i32* %p) local_unnamed_addr #1 { // CHECK: %[[tobool:.+]] = icmp eq i32 %a, 0 // CHECK: br i1 %[[tobool]], label %[[if_end3_critedge:.+]], label %[[if_then:.+]] // CHECK: [[if_then]]: // CHECK: tail call spir_func void @f() -// CHECK: tail call spir_func void @non_convfun() +// CHECK: tail call spir_func void @non_convfun(i32* %p) // CHECK: tail call spir_func void @g() // CHECK: br label %[[if_end3:.+]] // CHECK: [[if_end3_critedge]]: -// CHECK: tail call spir_func void @non_convfun() +// CHECK: tail call spir_func void @non_convfun(i32* %p) // CHECK: br label %[[if_end3]] // CHECK: [[if_end3]]: // CHECK: ret void -void test_merge_if(int a) { +void test_merge_if(int a, volatile int* p) { if (a) { f(); } - non_convfun(); + non_convfun(p); if (a) { g(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits