https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67290
Bug ID: 67290 Summary: powerpc: suboptimal add of u64 with u32 Product: gcc Version: 4.9.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: christophe.le...@c-s.fr Target Milestone: --- #define u32 unsigned long #define u64 unsigned long long u64 target(u64 base, u32 offset) { return base + offset; } With GCC 4.9.3 we get: (same with GCC 4.8.3) 00000000 <target>: 0: 7c ab 2b 78 mr r11,r5 4: 39 40 00 00 li r10,0 8: 7c 84 58 14 addc r4,r4,r11 c: 7c 63 51 14 adde r3,r3,r10 10: 4e 80 00 20 blr I would expect: <target>: addc r4,r4,r5 addze r3,r3 blr