[Bug target/43640] Struct with two floats generates poor code

2016-03-10 Thread sethml at ofb dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43640

Seth LaForge  changed:

   What|Removed |Added

 CC||sethml at ofb dot net

--- Comment #3 from Seth LaForge  ---
For what it's worth, this generates similarly terrible code on ARM with gcc
5.2.1. It also occurs if the struct members are ints:

struct u1 { int x, y; };
int foo(struct u1 u) { return u.x + u.y; }

% arm-none-eabi-gcc -O3 -S foo.c

foo:
sub sp, sp, #8
add r3, sp, #8
stmdb   r3, {r0, r1}
ldmia   sp, {r0, r3}
add r0, r0, r3
add sp, sp, #8
bx  lr

% arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.2.1 20151202
(release) [ARM/embedded-5-branch revision 231848]

[Bug target/43640] Struct with two floats generates poor code

2010-04-08 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2010-04-09 03:10 ---
Reloads are happening so this is a target issue really.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|middle-end  |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43640