https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115025
Haochen Jiang <haochen.jiang at intel dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jh at suse dot cz --- Comment #6 from Haochen Jiang <haochen.jiang at intel dot com> --- >From my investigation, there are two commits related to this PR. Both of them related to copy header pass (ch2). This is the dump before ch2 pass for that loop. <bb 9> [local count: 109475452]: _4 = n_1(D) % 5; if (_4 == 0) goto <bb 14>; [3.66%] else goto <bb 10>; [96.34%] <bb 10> [local count: 105468650]: _24 = n_1(D) % 7; if (_24 == 0) goto <bb 14>; [3.66%] else goto <bb 13>; [96.34%] First is r14-2675. After this commit, the ch2 pass refused to duplicate bb 9 and bb 10 for the following reason, which previously will duplicate. This caused half of the total regression. "Not duplicating bb 9: condition based on non-IV loop variant." The other is r14-2709. After this commit, the ch2 pass tried to duplicate both bb 9 and bb 10, but eventually the pass did not. However, the commit contributed the other half of the regression. Going to dig into deeper