]> git.ipfire.org Git - thirdparty/gcc.git/commit
noncontiguous ifcombine: skip marking of non-SSA_NAMEs [PR117915]
authorAlexandre Oliva <oliva@adacore.com>
Thu, 19 Dec 2024 01:17:13 +0000 (22:17 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 19 Dec 2024 01:19:35 +0000 (22:19 -0300)
commit34e6c77da699de4cd172523310123af8e0a36a36
treee4978f1e20ddc8a532d7588d62504d1e346844ec
parentf41fba5f14642bdb794e0635e37042250417678a
noncontiguous ifcombine: skip marking of non-SSA_NAMEs [PR117915]

When ifcombine_mark_ssa_name is called directly, rather than by
ifcombine_mark_ssa_name_walk, we need to check that name is an
SSA_NAME at the caller or in the function itself.  For convenience and
safety, I'm moving the checks from _walk to the implementation proper.

for  gcc/ChangeLog

PR tree-optimization/117915
* tree-ssa-ifcombine.cc (ifcombine_mark_ssa_name): Move
preconditions from...
(ifcombine_mark_ssa_name_walk): ... here.

for  gcc/testsuite/ChangeLog

PR tree-optimization/117915
* gcc.dg/pr117915.c: New.
gcc/testsuite/gcc.dg/pr117915.c [new file with mode: 0644]
gcc/tree-ssa-ifcombine.cc