[llvm] [OPT] Search whole BB for convergence token. (PR #112728)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 02:05:14 PDT 2024


================
@@ -180,6 +180,19 @@ namespace {
     }
   };
 
+  IntrinsicInst *getConevrgenceEntryIfAny(BasicBlock &BB) {
+    auto *I = BB.getFirstNonPHI();
+    while (I) {
+      if (auto *IntrinsicCall = dyn_cast<IntrinsicInst>(I)) {
----------------
ssahasra wrote:

This should dyn_cast to `ConvergenceControlInst`, and then check with `isEntry()`.

https://llvm.org/docs/doxygen/classllvm_1_1ConvergenceControlInst.html

https://github.com/llvm/llvm-project/pull/112728


More information about the llvm-commits mailing list