[llvm] [IR] Add CallBr intrinsics support (PR #133907)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 1 22:01:05 PDT 2025
================
@@ -3385,8 +3385,26 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
{LLVMContext::OB_deopt, LLVMContext::OB_funclet}) &&
"Cannot lower callbrs with arbitrary operand bundles yet!");
- assert(I.isInlineAsm() && "Only know how to handle inlineasm callbr");
- visitInlineAsm(I);
+ if (I.isInlineAsm()) {
+ visitInlineAsm(I);
+ } else if (I.getIntrinsicID() != Intrinsic::not_intrinsic) {
+ switch (I.getIntrinsicID()) {
+ default:
+ report_fatal_error("Unsupported intrinsic for callbr");
+ case Intrinsic::amdgcn_kill:
+ if (I.getNumIndirectDests() != 1)
+ report_fatal_error(
+ "amdgcn.kill supportes exactly one indirect destination");
----------------
arsenm wrote:
Same comments as the irtranslator cases. Either IR verifier error, or maybe these have to be proper context errors
https://github.com/llvm/llvm-project/pull/133907
More information about the llvm-commits
mailing list