[llvm] [SelectionDAG] Use reportFatalUsageError() for invalid operand bundles (PR #142613)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 07:41:56 PDT 2025


================
@@ -3380,9 +3381,10 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
 
   // Deopt bundles are lowered in LowerCallSiteWithDeoptBundle, and we don't
   // have to do anything here to lower funclet bundles.
-  assert(!I.hasOperandBundlesOtherThan(
-             {LLVMContext::OB_deopt, LLVMContext::OB_funclet}) &&
-         "Cannot lower callbrs with arbitrary operand bundles yet!");
+  if (I.hasOperandBundlesOtherThan(
+          {LLVMContext::OB_deopt, LLVMContext::OB_funclet}))
+    reportFatalUsageError(
+        "Cannot lower callbrs with arbitrary operand bundles!");
----------------
arsenm wrote:

```suggestion
        "cannot lower callbrs with arbitrary operand bundles!");
```

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


More information about the llvm-commits mailing list