[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


================
@@ -3275,12 +3275,13 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
 
   // Deopt and ptrauth bundles are lowered in helper functions, and we don't
   // have to do anything here to lower funclet bundles.
-  assert(!I.hasOperandBundlesOtherThan(
-             {LLVMContext::OB_deopt, LLVMContext::OB_gc_transition,
-              LLVMContext::OB_gc_live, LLVMContext::OB_funclet,
-              LLVMContext::OB_cfguardtarget, LLVMContext::OB_ptrauth,
-              LLVMContext::OB_clang_arc_attachedcall}) &&
-         "Cannot lower invokes with arbitrary operand bundles yet!");
+  if (I.hasOperandBundlesOtherThan(
+          {LLVMContext::OB_deopt, LLVMContext::OB_gc_transition,
+           LLVMContext::OB_gc_live, LLVMContext::OB_funclet,
+           LLVMContext::OB_cfguardtarget, LLVMContext::OB_ptrauth,
+           LLVMContext::OB_clang_arc_attachedcall}))
+    reportFatalUsageError(
+        "Cannot lower invokes with arbitrary operand bundles!");
----------------
arsenm wrote:

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

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


More information about the llvm-commits mailing list