https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87473
--- Comment #9 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- Author: wschmidt Date: Fri Oct 26 19:38:45 2018 New Revision: 265547 URL: https://gcc.gnu.org/viewcvs?rev=265547&root=gcc&view=rev Log: [gcc] 2018-10-26 Bill Schmidt <wschm...@linux.ibm.com> Backport from mainline 2018-10-19 Bill Schmidt <wschm...@linux.ibm.com> PR tree-optimization/87473 * gimple-ssa-strength-reduction.c (record_phi_increments): For phi arguments identical to the base expression of the phi candidate, record a phi-adjust increment of zero minus the index expression of the hidden basis. (phi_incr_cost): For phi arguments identical to the base expression of the phi candidate, the difference to compare against the increment is zero minus the index expression of the hidden basis, and there is no potential savings from replacing the (phi) statement. (ncd_with_phi): For phi arguments identical to the base expression of the phi candidate, the difference to compare against the increment is zero minus the index expression of the hidden basis. (all_phi_incrs_profitable): For phi arguments identical to the base expression of the phi candidate, the increment to be checked for profitability is zero minus the index expression of the hidden basis. [gcc/testsuite] 2018-10-26 Bill Schmidt <wschm...@linux.ibm.com> Backport from mainline 2018-10-19 Bill Schmidt <wschm...@linux.ibm.com> PR tree-optimization/87473 * gcc.c-torture/compile/pr87473.c: New file. Added: branches/gcc-7-branch/gcc/testsuite/gcc.c-torture/compile/pr87473.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/gimple-ssa-strength-reduction.c branches/gcc-7-branch/gcc/testsuite/ChangeLog