[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 12:26:30 PDT 2024


================
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name,
         }
       }
       setDSOLocal(F);
+      markRegisterParameterAttributes(F);
----------------
efriedma-quic wrote:

Sign/zero-extend attributes led to real issues on some targets in the past, so it's not unlikely someone will need to address it at some point.  But maybe it doesn't need to be here.  I guess leave a FIXME noting it as a known issue.

I'm not really happy with exposing this interface on BuildLibCalls.h, since it's really a pretty big footgun (due to the zero/sign-extension issue I mentioned).  But copy-pasting the code is worse, so... I guess leave a comment in the header.

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


More information about the cfe-commits mailing list