https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115934
Bug ID: 115934 Summary: [15 Regression] nvptx vs. ivopts: replace constant_multiple_of with aff_combination_constant_multiple_p [PR114932] Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: testsuite-fail Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: tnfchris at gcc dot gnu.org, vries at gcc dot gnu.org Target Milestone: --- Target: nvptx Recent commit r15-1809-g735edbf1e2479fa2323a2b4a9714fae1a0925f74 "ivopts: replace constant_multiple_of with aff_combination_constant_multiple_p [PR114932]" is causing one regression for nvptx target: PASS: gcc.dg/tree-ssa/pr43378.c (test for excess errors) PASS: gcc.dg/tree-ssa/pr43378.c scan-tree-dump-times ivopts "rite_[0-9]* = rite_[0-9]* - element" 1 [-PASS:-]{+FAIL:+} gcc.dg/tree-ssa/pr43378.c scan-tree-dump-times ivopts "left_[0-9]* = left_[0-9]* \\+ element|left_[0-9]* = element_[0-9]*\\(D\\) \\+ left" 1 Before (or, with this commit locally reverted), we have no 'diff' between the previous dump file: 'pr43378.c.186t.slp1' vs. 'pr43378.c.188t.ivopts', but now there's this: --- pr43378.c.186t.slp1 2024-07-15 11:48:57.498943077 +0200 +++ pr43378.c.188t.ivopts 2024-07-15 11:48:57.498943077 +0200 @@ -3,6 +3,18 @@ void foo (int left, int rite, int element) { + unsigned int _1; + unsigned int _2; + unsigned int _11; + unsigned int _12; + unsigned int _13; + unsigned int _17; + unsigned int _19; + unsigned int _20; + unsigned int _21; + unsigned int _22; + unsigned int _23; + <bb 2> [local count: 118111600]: if (left_4(D) <= rite_5(D)) goto <bb 5>; [89.00%] @@ -12,12 +24,23 @@ <bb 5> [local count: 105119324]: <bb 3> [local count: 955630224]: - # left_14 = PHI <left_10(6), left_4(D)(5)> # rite_15 = PHI <rite_8(6), rite_5(D)(5)> + _17 = (unsigned int) left_4(D); + _2 = (unsigned int) rite_5(D); + _1 = _2 + _17; + _13 = (unsigned int) rite_15; + _11 = -_13; + _12 = _1 + _11; + left_14 = (int) _12; rite_8 = rite_15 - element_7(D); bar (left_14, rite_8, element_7(D)); - left_10 = element_7(D) + left_14; - if (rite_8 >= left_10) + _19 = (unsigned int) left_4(D); + _20 = (unsigned int) rite_5(D); + _21 = _19 + _20; + _22 = (unsigned int) rite_8; + _23 = _21 - _22; + left_18 = (int) _23; + if (rite_8 >= left_18) goto <bb 6>; [89.00%] else goto <bb 4>; [11.00%] (I've not yet looked any deeper.)