diff options
| author | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2025-11-06 12:04:30 -0800 |
|---|---|---|
| committer | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2025-11-07 12:06:32 -0800 |
| commit | a1de16a8e523de2ba928f7b5251059329eef0dc6 (patch) | |
| tree | bcf74387b146b6ef244284cae2f613a21f4cfc07 /libjava/java/security/Engine.java | |
| parent | 0c0b0e727995cee804d5f72d243ca2112a0005c2 (diff) | |
| download | gcc-a1de16a8e523de2ba928f7b5251059329eef0dc6.zip gcc-a1de16a8e523de2ba928f7b5251059329eef0dc6.tar.gz gcc-a1de16a8e523de2ba928f7b5251059329eef0dc6.tar.bz2 | |
forwprop: Handle already true/false branchs in optimize_unreachable [PR122588]
When optimize_unreachable was moved from fab to forwprop, I missed that due to
the integrated copy prop, we might end up with an already true branch leading
to a __builtin_unreachable block. optimize_unreachable would switch around
the if and things go down hill from there since the other edge was already
marked as non-executable, forwprop didn't process those blocks and didn't
do copy prop into that block and the original assignment statement was removed.
This fixes the problem by having optimize_unreachable not touch the if
statement was already changed to true/false.
Note I placed the testcase in gcc.c-torture/compile as gcc.dg/torture
is NOT currently testing -Og (see PR 122450 for that).
Changes since v1:
* v2: Add gimple testcase.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/122588
gcc/ChangeLog:
* tree-ssa-forwprop.cc (optimize_unreachable): Don't touch
if the condition was already true or false.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/pr122588-1.c: New test.
* gcc.dg/tree-ssa/pr122588-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Diffstat (limited to 'libjava/java/security/Engine.java')
0 files changed, 0 insertions, 0 deletions
