[llvm] [SPIRV] convergence anchor intrinsic does not have a parent token (PR #122230)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 06:46:06 PST 2025


================
@@ -56,20 +56,8 @@ getConvergenceTokenInternal(BasicBlockType *BB) {
       "Output type must be an intrinsic instruction.");
 
   for (auto &I : *BB) {
-    if (auto *II = dyn_cast<IntrinsicInst>(&I)) {
-      switch (II->getIntrinsicID()) {
-      case Intrinsic::experimental_convergence_entry:
-      case Intrinsic::experimental_convergence_loop:
-        return II;
-      case Intrinsic::experimental_convergence_anchor: {
-        auto Bundle = II->getOperandBundle(LLVMContext::OB_convergencectrl);
-        assert(Bundle->Inputs.size() == 1 &&
----------------
s-perron wrote:

Agreed this assert is wrong, but the question I have is if the analysis will do the correct thing if `II` is returned. I'm guessing we do not test that.

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


More information about the llvm-commits mailing list