]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end: Fix GSI for gcond root [PR117140]
authorTamar Christina <tamar.christina@arm.com>
Fri, 18 Oct 2024 09:37:28 +0000 (10:37 +0100)
committerTamar Christina <tamar.christina@arm.com>
Fri, 18 Oct 2024 09:37:28 +0000 (10:37 +0100)
commit51291ad0f1f89a81de917110af96e019dcd5690c
treeddca353e1c58a506999d899a481a1015162ebd42
parent55f898008ec8235897cf56c89f5599c3ec1bc963
middle-end: Fix GSI for gcond root [PR117140]

When finding the gsi to use for code of the root statements we should use the
one of the original statement rather than the gcond which may be inside a
pattern.

Without this the emitted instructions may be discarded later.

gcc/ChangeLog:

PR tree-optimization/117140
* tree-vect-slp.cc (vectorize_slp_instance_root_stmt): Use gsi from
original statement.

gcc/testsuite/ChangeLog:

PR tree-optimization/117140
* gcc.dg/vect/vect-early-break_129-pr117140.c: New test.
gcc/testsuite/gcc.dg/vect/vect-early-break_129-pr117140.c [new file with mode: 0644]
gcc/tree-vect-slp.cc