https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78634
Bug ID: 78634 Summary: [7 Regression] 30% performance drop after r242832. Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ysrumyan at gmail dot com Target Milestone: --- Created attachment 40215 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40215&action=edit test-case to reproduce We noticed a huge performance regression on x86 for one important benchmark (the reproduced for which is attached). It is caused by additional if-conversion which can be seen in ce2 dump: IF-THEN-ELSE-JOIN block found, pass 1, test 12, then 13, else 14, join 15 scanning new insn with uid = 163. scanning new insn with uid = 164. scanning new insn with uid = 165. scanning new insn with uid = 166. scanning new insn with uid = 167. scanning new insn with uid = 168. scanning new insn with uid = 169. if-conversion succeeded through noce_try_cmove_arith deleting insn with uid = 85. deleting block 14 Removing jump 78. deleting insn with uid = 78. deleting insn with uid = 80. deleting block 13 Merging block 15 into block 12... changing bb of uid 87 changing bb of uid 88 from 15 to 12 changing bb of uid 89 from 15 to 12 Merged blocks 12 and 15. Conversion succeeded on pass 1. On AVX2 machine we see: time ./test1.1124.exe // build by compiler before r242832. real 0m0.577s user 0m0.575s sys 0m0.002s time ./test1.1125.exe // build by compiler after r242832. real 0m0.888s user 0m0.886s sys 0m0.001s It is sufficient to compile it with -Ofast option to reproduce on x86.