https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114253
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- ``` <bb 6> [local count: 1073741824]: # pid_16 = PHI <pid_25(4), pid_24(D)(5)> # pid$4_26 = PHI <pid$4_10(4), 0(5)> kill_pid (0); goto <bb 8>; [100.00%] <bb 7> [count: 0]: <L13>: goto <bb 15>; [100.00%] <bb 8> [local count: 1073741824]: _12 = VIEW_CONVERT_EXPR<bool>(pid$4_26); if (_12 != 0) goto <bb 9>; [33.00%] else goto <bb 16>; [67.00%] <bb 9> [local count: 354334800]: kill_pid (pid_16); goto <bb 11>; [100.00%] ``` Funny if we turn off SRA we get: ``` <bb 8> [local count: 354334800]: _2 = MEM[(int &)&pid]; kill_pid (_2); goto <bb 10>; [100.00%] <bb 9> [count: 0]: <L14>: goto <bb 14>; [100.00%] <bb 10> [local count: 536870912]: kill_pid (_2); <bb 17> [local count: 536870912]: goto <bb 12>; [100.00%] ``` (note bb9/bb17 here looks to be landing pads for EH).