https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88842
luoxhu at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luoxhu at gcc dot gnu.org --- Comment #3 from luoxhu at gcc dot gnu.org --- One more case of missed optimization CSE, reassoc: void foo(unsigned int a, unsigned int b, unsigned int c, unsigned int d, int *res1, int*res2, int *res3) { *res1 = a + b + c + d; *res2 = b + c; *res3 = a + d; } cat foo.s .file "foo.c" .machine power8 .abiversion 2 .section ".text" .align 2 .p2align 4,,15 .globl foo .type foo, @function foo: .LFB0: .cfi_startproc add 10,5,6 add 10,10,4 add 4,4,5 add 10,10,3 add 3,3,6 stw 10,0(7) stw 4,0(8) stw 3,0(9) blr