[PATCH] D38113: OpenCL: Assume functions are convergent

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 05:03:46 PDT 2017


yaxunl added a comment.

Do we need an option to disable this? In case it causes regression in some applications and users want to disable it. At least for debugging.



================
Comment at: test/CodeGenOpenCL/convergent.cl:73
 // CHECK:  %[[tobool_pr:.+]] = phi i1 [ true, %[[if_then]] ], [ false, %{{.+}} ]
-// CHECK:  tail call spir_func void @convfun() #[[attr5:.+]]
+// CHECK:  tail call spir_func void @convfun() #[[attr4:.+]]
 // CHECK:  br i1 %[[tobool_pr]], label %[[if_then2:.+]], label %[[if_end3:.+]]
----------------
check the attribute has convergent


================
Comment at: test/CodeGenOpenCL/convergent.cl:95
+// CHECK-LABEL: define spir_func void @test_unroll() local_unnamed_addr #1
+// CHECK:  tail call spir_func void @convfun() #[[attr4:[0-9]+]]
+// CHECK:  tail call spir_func void @convfun() #[[attr4]]
----------------
need to check the attribute is convergent


================
Comment at: test/CodeGenOpenCL/convergent.cl:118
 // CHECK: [[for_body]]:
-// CHECK:  tail call spir_func void @nodupfun() #[[attr6:[0-9]+]]
+// CHECK:  tail call spir_func void @nodupfun() #[[attr5:[0-9]+]]
 // CHECK-NOT: call spir_func void @nodupfun()
----------------
need to check the attribute has noduplicate


================
Comment at: test/CodeGenOpenCL/convergent.cl:127
 
 // CHECK: declare spir_func void @nodupfun(){{[^#]*}} #[[attr3:[0-9]+]]
 
----------------
check the attribute has noduplicate


https://reviews.llvm.org/D38113





More information about the cfe-commits mailing list