public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/personal-branch)] make sure prev is the phi, and next is for the same phi
@ 2021-06-09 4:55 Jiu Fu Guo
0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2021-06-09 4:55 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c05852b0ee2c946dc06555c6c5649d5de661dfab
commit c05852b0ee2c946dc06555c6c5649d5de661dfab
Author: Jiufu Guo <guojiufu@linux.ibm.com>
Date: Wed Jun 9 12:54:52 2021 +0800
make sure prev is the phi, and next is for the same phi
Diff:
---
gcc/tree-ssa-loop-split.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/gcc/tree-ssa-loop-split.c b/gcc/tree-ssa-loop-split.c
index 3d9cd2e4cc3..e01d44a6b28 100644
--- a/gcc/tree-ssa-loop-split.c
+++ b/gcc/tree-ssa-loop-split.c
@@ -1730,6 +1730,12 @@ analyze_idx_elements (class loop *loop, edge e, idx_elements &data)
if (TREE_CODE (gimple_assign_rhs2 (stmt)) != INTEGER_CST)
return false;
inc_stmt = stmt;
+ tree prev = gimple_assign_rhs1 (stmt);
+ if (TREE_CODE (prev) != SSA_NAME)
+ return false;
+ stmt = filter_conversions (loop, prev, &small_type, &large_type);
+ if (stmt != phi)
+ return false;
data.gc = gc;
data.phi = phi;
@@ -1921,12 +1927,11 @@ split_wrap_boundary (class loop *loop, edge e, tree no_wrap_cond)
/* Version the loop. */
initialize_original_copy_tables ();
basic_block cond_bb;
- class loop *loop1
- = loop_version (loop, no_wrap_cond, &cond_bb,
- profile_probability::very_likely (),
- profile_probability::very_unlikely (),
- profile_probability::very_likely (),
- profile_probability::very_unlikely (), true);
+ loop_version (loop, no_wrap_cond, &cond_bb,
+ profile_probability::very_likely (),
+ profile_probability::very_unlikely (),
+ profile_probability::very_likely (),
+ profile_probability::very_unlikely (), true);
free_original_copy_tables ();
/* Insert the statements that feed COND. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-09 4:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 4:55 [gcc(refs/users/guojiufu/heads/personal-branch)] make sure prev is the phi, and next is for the same phi Jiu Fu Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).