[clang] [MIPS] fix zero-sized type causing incorrect register for later float arguments (PR #213746)

Folkert de Vries via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 01:43:02 PDT 2026


================
@@ -28,3 +28,40 @@ T2 T2_retval;
 T2 fn28(char arg0) {
   return T2_retval;
 }
+
+// A zero-sized argument consumes no register, but on O32 it does end the run of
+// leading floating-point arguments, so the arguments after it are passed in
+// integer registers.
+//
+// O32: define{{.*}} void @fn29(i32 noundef %arg1.coerce, i64 noundef %arg2.coerce)
+// O32: declare void @fn30(i32 noundef, i64 noundef)
----------------
folkertdev wrote:

Yes it's weird, my local GCC does default to hard float.

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


More information about the cfe-commits mailing list