]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/122301 - fix ICE and improve vectorization of min/max reduction
authorRichard Biener <rguenther@suse.de>
Fri, 17 Oct 2025 07:26:25 +0000 (09:26 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 17 Oct 2025 08:24:49 +0000 (10:24 +0200)
commit2cb9925f4001b931f43ea64b64adf9dbc1089bfa
treef5ba0dad39dd524f68206c66f149fea983be44a3
parent6883d51304f1aa852da3f2b4eb26bdf2e12bbcb9
tree-optimization/122301 - fix ICE and improve vectorization of min/max reduction

The following fixes another issue with updating of reduc_idx in pattern
sequences.  But the testcase also shows the pattern in question is
harmful for vectorization since a reduction path may not contain
promotions/demotions.  So the already existing but ineffective check
to guard the pattern is fixed.

PR tree-optimization/122301
* tree-vect-patterns.cc (vect_recog_over_widening_pattern):
Fix reduction guard.
(vect_mark_pattern_stmts): Fix reduction def check.

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