diff options
author | Richard Biener <rguenther@suse.de> | 2024-12-10 09:55:37 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-05-27 15:19:08 +0200 |
commit | 8da568c885dc90ac5c7d9aee34ae78d5cfb8918c (patch) | |
tree | 6e9c712c8fae2085d46aedc5e593344564f1f97f /libjava/classpath/lib/java | |
parent | ec5349c37afe972ee79b777ee749630b1a0a007e (diff) | |
download | gcc-8da568c885dc90ac5c7d9aee34ae78d5cfb8918c.zip gcc-8da568c885dc90ac5c7d9aee34ae78d5cfb8918c.tar.gz gcc-8da568c885dc90ac5c7d9aee34ae78d5cfb8918c.tar.bz2 |
tree-optimization/117965 - phiprop validity checking is too strict
The PR shows that when using std::clamp from the C++ standard library
and there is surrounding code using exceptions then phiprop can fail
to simplify the code so phiopt can turn the clamping into efficient
min/max operations.
The validation code is needlessly complicated, steming from the
time we had memory-SSA with multiple virtual operands. The following
simplifies this, thereby fixing this issue.
PR tree-optimization/117965
* tree-ssa-phiprop.cc (phivn_valid_p): Remove.
(propagate_with_phi): Pass in virtual PHI node from BB,
rewrite load motion validity check to require the same
virtual use along all paths.
* g++.dg/tree-ssa/pr117965-1.C: New testcase.
* g++.dg/tree-ssa/pr117965-2.C: Likewise.
Diffstat (limited to 'libjava/classpath/lib/java')
0 files changed, 0 insertions, 0 deletions