================
@@ -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:

So, embarrassingly, my link uses sparc because I'm fixing a very similar issue 
over there too. 

It turns out that godbolt's GCC is soft-float by default, search for 
`with-float=soft` in the `-###` output:

https://godbolt.org/z/r84shK1Kq

When you enable `-mhard-float` the two functions emit different assembly, and 
with this patch Clang (which is hard-float by default) matches GCC with 
`-mhard-float`. 

https://godbolt.org/z/zMW6MMoze



https://github.com/llvm/llvm-project/pull/213746
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to