]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
phiprop: Fix typo [PR125067]
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 28 Apr 2026 19:46:31 +0000 (12:46 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 28 Apr 2026 21:27:45 +0000 (14:27 -0700)
When I factored out the code in can_handle_load, I had a small typo
which seemed to work for most cases but I had noticed later on was
broken. Basically the bb where the vop definition has to be dominated
by the current bb (and can't be the current bb).

Pushed as obvious afte a quick bootstrapped.

PR tree-optimization/125067

gcc/ChangeLog:

* tree-ssa-phiprop.cc (can_handle_load): Fix copy and pasto
on dominated_by_p.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-ssa-phiprop.cc

index 07c81fdce28f225b5c43296d46cd65b71be4f174..b7ce7b4a18453e46c78e2980c34541c2a19d9ae7 100644 (file)
@@ -259,8 +259,8 @@ can_handle_load (gimple *load_stmt, basic_block bb,
   if (SSA_NAME_IS_DEFAULT_DEF (vuse))
     return true;
   if (gimple_bb (def_stmt) != bb
-      && !dominated_by_p (CDI_DOMINATORS,
-                         bb, gimple_bb (def_stmt)))
+      && dominated_by_p (CDI_DOMINATORS,
+                        bb, gimple_bb (def_stmt)))
     return true;
   return false;
 }