[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


================
@@ -9549,12 +9551,12 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
   // Deopt bundles are lowered in LowerCallSiteWithDeoptBundle, and we don't
   // have to do anything here to lower funclet bundles.
   // CFGuardTarget bundles are lowered in LowerCallTo.
-  assert(!I.hasOperandBundlesOtherThan(
-             {LLVMContext::OB_deopt, LLVMContext::OB_funclet,
-              LLVMContext::OB_cfguardtarget, LLVMContext::OB_preallocated,
-              LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_kcfi,
-              LLVMContext::OB_convergencectrl}) &&
-         "Cannot lower calls with arbitrary operand bundles!");
+  if (I.hasOperandBundlesOtherThan(
+          {LLVMContext::OB_deopt, LLVMContext::OB_funclet,
+           LLVMContext::OB_cfguardtarget, LLVMContext::OB_preallocated,
+           LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_kcfi,
+           LLVMContext::OB_convergencectrl}))
+    reportFatalUsageError("Cannot lower calls with arbitrary operand bundles!");
----------------
arsenm wrote:

```suggestion
    reportFatalUsageError("cannot lower calls with arbitrary operand bundles!");
```

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


More information about the llvm-commits mailing list