[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
Thu Aug 6 03:27:07 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:
What command did you run for that output? On godbolt the result for these two types is different
https://godbolt.org/z/1Kqrbxv9n
I.e. the output is different from what you got, but also the two functions have different assembly. Maybe the GCC version is relevant? I'm using the most recent 16.0.1 here.
https://github.com/llvm/llvm-project/pull/213746
More information about the cfe-commits
mailing list