]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/115723 - ICE with .COND_ADD reduction
authorRichard Biener <rguenther@suse.de>
Mon, 1 Jul 2024 08:06:55 +0000 (10:06 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 1 Jul 2024 09:00:04 +0000 (11:00 +0200)
commit286cda3461d6f5ce7d911d3f26bd4975ea7ea11d
treed881230791e8e9396184322f9b605a94478f3fea
parent382e2123c402edb6123f0c4669fa298d4140edd8
tree-optimization/115723 - ICE with .COND_ADD reduction

The following fixes an ICE with a .COND_ADD discovered as reduction
even though its else value isn't the reduction chain link but a
constant.  This would be wrong-code with --disable-checking I think.

PR tree-optimization/115723
* tree-vect-loop.cc (check_reduction_path): For a .COND_ADD
verify the else value also refers to the reduction chain op.

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