[PATCH] D158147: [RFC][GlobalISel] convergence control tokens and intrinsics

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 06:36:43 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:91
 
+static bool isEntryTokenIfPresent(const CallBase &CB) {
+  auto Bundle = CB.getOperandBundle(LLVMContext::OB_convergencectrl);
----------------
isEntryConvergenceToken


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:213
 
-  assert(Val.getType()->isSized() &&
+  assert((Val.getType()->isSized() || Val.getType()->isTokenTy()) &&
          "Don't know how to create an empty vreg");
----------------
I think you should just bypass this assert, you're creating one special case that doesn't benefit from any of the type logic here


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2462
+    auto *Token = Bundle->Inputs[0].get();
+    ConvergenceCtrlToken = getOrCreateVReg(*Token);
+  }
----------------
Just directly create the token vreg 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158147/new/

https://reviews.llvm.org/D158147



More information about the llvm-commits mailing list