]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/110799 - fix bug in code hoisting
authorRichard Biener <rguenther@suse.de>
Wed, 26 Jul 2023 07:28:10 +0000 (09:28 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 26 Jul 2023 09:41:31 +0000 (11:41 +0200)
commit565e0e80660dac24e5193873ca07542b99cd8bc3
tree49b1bfd09c441e6cdfab593d4fc573cf68319899
parent21da32d995c8b574c929ec420cd3b0fcfe6fa4fe
tree-optimization/110799 - fix bug in code hoisting

Code hoisting part of GIMPLE PRE failed to adjust the TBAA behavior
of common loads in the case the alias set of the ref was the same
but the base alias set was not.  It also failed to adjust the
base behavior, assuming it would match.  The following plugs this
hole.

PR tree-optimization/110799
* tree-ssa-pre.cc (compute_avail): More thoroughly match
up TBAA behavior of redundant loads.

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