]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116380 - bogus SSA update with loop distribution
authorRichard Biener <rguenther@suse.de>
Wed, 21 Aug 2024 11:56:40 +0000 (13:56 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 21 Aug 2024 12:47:53 +0000 (14:47 +0200)
commitaf0d2d95a5f767d92bd64f959679fb4612247b0b
tree5688e1bbfd328af9a9efc0d0bb95acf0644aacf6
parentfd7dabc116b9abc40ee6aa25bcc5d240b8cc516a
tree-optimization/116380 - bogus SSA update with loop distribution

When updating LC PHIs after copying loops we have to handle defs
defined outside of the loop appropriately (by not setting them to
NULL ...).  This mimics how we handle this in the SSA updating
code of the vectorizer.

PR tree-optimization/116380
* tree-loop-distribution.cc (copy_loop_before): Handle
out-of-loop defs appropriately.

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