https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89310
Bug ID: 89310 Summary: Poor code generation returning float field from a struct Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bergner at gcc dot gnu.org Target Milestone: --- The following test case shows poor code generation on powerpc64le-linux: bergner@pike:~/gcc/BUGS/PR88845$ cat struct.i struct s { int i; float f; }; float foo (struct s arg) { return arg.f; } bergner@pike:~/gcc/BUGS/PR88845$ gcc -O2 -S struct.i bergner@pike:~/gcc/BUGS/PR88845$ cat struct.s foo: srdi 3,3,32 sldi 9,3,32 mtvsrd 1,9 xscvspdpn 1,1 blr The srdi followed by a sldi could be replaced with a simple: rldicr 9,3,0,31