https://bugs.llvm.org/show_bug.cgi?id=39902
Bug ID: 39902
Summary: Complex double passed as an argument in c uses a spill
and ldc1 rather than a pair of mtc1/mthc1 on mips32r2
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: MIPS
Assignee: unassignedb...@nondot.org
Reporter: cassandra.l.mcc...@gmail.com
CC: llvm-bugs@lists.llvm.org
Compiling the following code snippet using clang results in the arguments
spilling to the stack and the using ldc1 rather than a pair of mtc1/mthc1 on
mips32r2 with -mfp32.
The exact flags used during compilation -O3 -target mipsel -S -march=mips32r2
-ffast-math -mfp32 -mtune=mips32r2
#include <complex.h>
complex double __attribute((noinline)) square(complex double c)
{
return c * c;
}
Note that the same is true for the opposite, when calling a function like this
the fp registers are spilled to memory and then loaded back into the argument
registers.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs