]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/109849 - fix fallout of PRE hoisting change
authorRichard Biener <rguenther@suse.de>
Wed, 24 May 2023 10:36:28 +0000 (12:36 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 24 May 2023 11:17:10 +0000 (13:17 +0200)
commit5476de2618ffb77f3a52e59e2c9f10b018329689
tree5c1c12fb0740946faf080c128b990518770fbe84
parentaa8b363171a95b8f867a74f29c75f9577e9087e1
tree-optimization/109849 - fix fallout of PRE hoisting change

The PR109849 fix made us no longer hoist some memory loads because
of the expression set intersection.  We can still avoid to compute
the union by simply taking the first sets expressions and leave
the pruning of expressions with values not suitable for hoisting
to sorted_array_from_bitmap_set.

PR tree-optimization/109849
* tree-ssa-pre.cc (do_hoist_insertion): Do not intersect
expressions but take the first sets.

* gcc.dg/tree-ssa/ssa-hoist-9.c: New testcase.
gcc/testsuite/gcc.dg/tree-ssa/ssa-hoist-9.c [new file with mode: 0644]
gcc/tree-ssa-pre.cc