aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-06-29 14:30:34 -0700
committerAndrew Pinski <apinski@marvell.com>2021-07-06 00:32:40 -0700
commit51abfb6a893c87dbf84a33009b6cd6dbd25d66f1 (patch)
tree3ba29867c6a85c8d476306977787785c5f2ffb70 /gcc/ada
parentd7e3855d5dd8c001bb65dc7da1cda0249bfc2986 (diff)
downloadgcc-51abfb6a893c87dbf84a33009b6cd6dbd25d66f1.zip
gcc-51abfb6a893c87dbf84a33009b6cd6dbd25d66f1.tar.gz
gcc-51abfb6a893c87dbf84a33009b6cd6dbd25d66f1.tar.bz2
Fix 101256: Wrong code due to range incorrect from PHI-OPT
So the problem here is that replace_phi_edge_with_variable will copy range information to a already (not newly) defined ssa name. This causes wrong code later on. This fixes the problem by require the new ssa name to be defined in the same bb as the conditional that is about to be deleted. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Changes from v1: * this is a simplification of what was trying to be done before. gcc/ChangeLog: PR tree-optimization/101256 * dbgcnt.def (phiopt_edge_range): New counter. * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Check to make sure the new name is defined in the same bb as the conditional before duplicating range info. Also add debug counter. gcc/testsuite/ChangeLog: PR tree-optimization/101256 * g++.dg/torture/pr101256.C: New test.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions