https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #11 from Jeffrey A. Law <law at redhat dot com> --- We're closer now than before: test () { int i; <bb 2> [local count: 1073741824]: i_8 = num; if (i_8 == 1) goto <bb 3>; [34.00%] else goto <bb 5>; [66.00%] <bb 3> [local count: 365072220]: MEM[(int *)&a] = 0; MEM[(int *)&a + 4B] = 0; <bb 4> [local count: 1073741824]: MEM[(int *)&a + 8B] = 0; return; <bb 5> [local count: 730144446]: MEM[(int *)&a] = 0; MEM[(int *)&a + 4B] = 0; goto <bb 4>; [100.00%] } I wonder if the block hashing stuff from ICF would allow us to determine that bb3 and bb5 are equivalent. That in turn would allow us to recognize the test in bb2 isn't actually needed. It was always my hope that the ICF infrastructure could be used in this way.