]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/118852 - wrong code with 502.gcc_r
authorRichard Biener <rguenther@suse.de>
Fri, 14 Feb 2025 13:48:41 +0000 (14:48 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 14 Feb 2025 17:40:52 +0000 (18:40 +0100)
commit589d79e6268b055422a7b6c11cd0a8a4f2531a8c
treedca87f1d2f980df036ac4910f8e7427534cf9aa7
parente96e1bb69c7b46db18e747ee379a62681bc8c82d
tree-optimization/118852 - wrong code with 502.gcc_r

502.gcc_r when built with -fprofile-generate exposes a SLP discovery
issue where an IV forced live due to early break is not properly
discovered if its latch def is part of a different IVs SSA cycle.
To mitigate this we have to make sure to create an SLP instance
for the original IV.  Ideally we'd handle all vect_induction_def
the same but this is left for next stage1.

PR tree-optimization/118852
* tree-vect-slp.cc (vect_analyze_slp): For early-break
forced-live IVs make sure we create an appropriate
entry into the SLP graph.

* gcc.dg/vect/pr118852.c: New testcase.
gcc/testsuite/gcc.dg/vect/pr118852.c [new file with mode: 0644]
gcc/tree-vect-slp.cc