[llvm] [llvm][ir]: fix llc crashes on function definitions with label parameters (PR #136285)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 02:42:52 PDT 2025


================
@@ -2931,6 +2931,8 @@ void Verifier::visitFunction(const Function &F) {
           FT->getParamType(i));
     Check(Arg.getType()->isFirstClassType(),
           "Function arguments must have first-class types!", &Arg);
+    Check(!Arg.getType()->isLabelTy(),
----------------
phoebewang wrote:

We should allow it for asm, see https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/X86/asm-block-labels.ll

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


More information about the llvm-commits mailing list