aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-08-11 10:46:12 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2025-08-11 15:42:07 +0200
commit45a56f42b4909e2ae0d1ad35dab05c5c092a14bc (patch)
tree3a95956e9840b05828469455883eba0a83fa626e /gcc
parent86abacb710b559a022ac61ef955457f0efe79a0a (diff)
downloadgcc-45a56f42b4909e2ae0d1ad35dab05c5c092a14bc.zip
gcc-45a56f42b4909e2ae0d1ad35dab05c5c092a14bc.tar.gz
gcc-45a56f42b4909e2ae0d1ad35dab05c5c092a14bc.tar.bz2
tree-optimization/121362 - fixup thinko in earlier change
The following fixes the index guards on the component stripping loops, I swapped them it seems. PR tree-optimization/121362 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Swap index guards on component stripping loops.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-ssa-sccvn.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc
index ccd8080..866d49c 100644
--- a/gcc/tree-ssa-sccvn.cc
+++ b/gcc/tree-ssa-sccvn.cc
@@ -3573,7 +3573,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
try finding a match in one of the outer components and continue
stripping there. This happens when addresses of components get
forwarded into dereferences. */
- if (j > 0)
+ if (i > 0)
{
int temi = i - 1;
extra_off = vr->operands[i].off;
@@ -3598,7 +3598,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
temi--;
}
}
- if (!found && i > 0)
+ if (!found && j > 0)
{
int temj = j - 1;
extra_off = -lhs_ops[j].off;