]> gcc.gnu.org Git - gcc.git/commit
tree-ssa-sink: do not touch calls that return twice
authorAlexander Monakov <amonakov@ispras.ru>
Mon, 7 Nov 2022 12:33:01 +0000 (15:33 +0300)
committerAlexander Monakov <amonakov@ispras.ru>
Mon, 7 Nov 2022 13:01:14 +0000 (16:01 +0300)
commit5d060d8b0477ff4911f41c816281daaa24b41a13
treec50c40b221a09b3b2e98e85f9c17360d0391c370
parent3bff15c1c9fb3eb0bb042717e072476ec2d6d88c
tree-ssa-sink: do not touch calls that return twice

Avoid moving pure/const calls that may return twice in tree-ssa-sink:
properly redirecting the associated abnormal edge is non-trivial.

gcc/ChangeLog:

PR tree-optimization/107505
* tree-ssa-sink.cc (statement_sink_location): Additionally
reject ECF_RETURNS_TWICE calls.

gcc/testsuite/ChangeLog:

PR tree-optimization/107505
* gcc.dg/pr107505.c: New test.
gcc/testsuite/gcc.dg/pr107505.c [new file with mode: 0644]
gcc/tree-ssa-sink.cc
This page took 0.075981 seconds and 6 git commands to generate.