[clang] [CIR] Freeze maybe_undef call arguments (PR #234124)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 23 17:04:58 PDT 2026


================
@@ -1359,6 +1380,10 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo,
       assert(!cir::MissingFeatures::lowerAggregateLoadStore());
       cirCallArgs[argNo] = builder.createLoad(argLoc, src);
     }
+
+    if (isArgumentMaybeUndef(targetDecl, funcInfo.getNumRequiredArgs(), argNo))
----------------
andykaylor wrote:

I'm not sure this is the right place to do this. Classic codegen has it in a lot of places that depend on the ABI classification. It always creates a freeze, but I'm not sure if it's always needed depending on the classification. Can you at least add test cases that hit all the different paths where classic codegen does this?

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


More information about the cfe-commits mailing list