[llvm] [SelectionDAG][GlobalISel] Diagnose va_arg with an aggregate type (PR #225091)

Timur Baidusenov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 08:58:44 PDT 2026


bai-tim wrote:

> > Rejecting it in the verifier would be cleaner, but there are in-tree producers today: ClangIR emits va_arg ptr %ap, { float, float } for a float _Complex argument on x86-64 (clang/test/CIR/CodeGen/complex.cpp, marked as a TODO until calling convention lowering lands), and from reading MSP430ABIInfo::EmitVAArg, it passes _Complex as Direct, which
> 
> What does the reference clang codegen do? I don't expect CIR to start using new IR constructs

I'll switch to the verifier. Since clang verifies -emit-llvm output, the -emit-llvm run of CIR/CodeGen/complex.cpp will start failing because of foo33. I'd move foo33 into its own test that keeps the CIR and OGCG checks and drops the CIR-to-LLVM one until CIR lowers it. Does that sound OK, or should the CIR side handle it first? I can fix the MSP430 _Complex case in a separate PR.

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


More information about the llvm-commits mailing list