https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79354

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps add also foo (&b); below foo (&h); to avoid any kind of IPA thinking
the memcpy is useless.

It is apparently the movsi_from_sf instruction that has this, added by Michael
in r244279.  TARGET_NO_SF_SUBREG can be enabled already for power8:
rs6000.h:#define TARGET_NO_SF_SUBREG    TARGET_DIRECT_MOVE_64BIT
rs6000.h:#define TARGET_DIRECT_MOVE_64BIT       (TARGET_DIRECT_MOVE            
\
rs6000.h-                                        && TARGET_P8_VECTOR           
\
rs6000.h-                                        && TARGET_POWERPC64           
\
rs6000.h-                                        && TARGET_UPPER_REGS_DI       
\
rs6000.h-                                        &&
(rs6000_altivec_element_order != 2))
so if some alternatives of the insn are power9 insns, those should be either
disabled through constraints, or enabled attribute, or we need
to have multiple movsi_from_sf instructions depending on the ISA.
enabled attribute doesn't seem to be deployed in the rs6000 backend, the
alternative uses wu constraint which is also enabled
for power8.  So, perhaps we need a wu-like constraint that is only enabled for
power9?

Reply via email to