https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71437
Bug ID: 71437 Summary: [7 regression' Performance regression after r235817 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ysrumyan at gmail dot com Target Milestone: --- We noticed ~10% slowdown on one important benchmark used for Silvermont testing. I can reproduced this performance gap using attached test-case on SandyBridge: before r235817 time ./good.exe W[100]=10 real 0m0.761s r235817 W[100]=10 real 0m0.863s THere exist another optimization opportunnty, which can be illustrated by the following test fragment: if( i == ( I - 1 ) ) L = pL[i] ; LD = (float)( L - pL[i] ) / (float)( pL[i + 1] - pL[i] ) ; It is clear that LD value is 0 if L == pL[i], i.e. we can move the second statement inside the hammock and perform simplification.