diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2020-04-03 02:10:08 -0500 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2020-04-03 03:07:46 -0500 |
commit | 4441ecedc3d74114683761901075085651928c52 (patch) | |
tree | 449a8666b1f7b8ac0bf188b7b107c4c3b88c58e8 /gcc/tree-vect-loop.c | |
parent | 55a7380213a5c16120d5c674fb42b38a3d796b57 (diff) | |
download | gcc-4441ecedc3d74114683761901075085651928c52.zip gcc-4441ecedc3d74114683761901075085651928c52.tar.gz gcc-4441ecedc3d74114683761901075085651928c52.tar.bz2 |
Fix PR94443 with gsi_insert_seq_before [PR94443]
This patch is to fix the stupid mistake by using
gsi_insert_seq_before instead of gsi_insert_before.
BTW, the regression testing on one x86_64 machine from CFarm is
unable to reveal it (I guess due to native arch sandybridge?), so I
specified additional option -march=znver2 and verified the coverage.
Bootstrapped/regtested on powerpc64le-linux-gnu (P9) and
x86_64-pc-linux-gnu, also verified the fail cases in related PRs.
2020-04-03 Kewen Lin <linkw@gcc.gnu.org>
gcc/
PR tree-optimization/94443
* tree-vect-loop.c (vectorizable_live_operation): Use
gsi_insert_seq_before to replace gsi_insert_before.
gcc/testsuite/
PR tree-optimization/94443
* gcc.dg/vect/pr94443.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index c9b6534..265bcfd 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8050,7 +8050,7 @@ vectorizable_live_operation (stmt_vec_info stmt_info, if (stmts) { gimple_stmt_iterator exit_gsi = gsi_after_labels (exit_bb); - gsi_insert_before (&exit_gsi, stmts, GSI_CONTINUE_LINKING); + gsi_insert_seq_before (&exit_gsi, stmts, GSI_SAME_STMT); /* Remove existing phi from lhs and create one copy from new_tree. */ tree lhs_phi = NULL_TREE; @@ -8063,7 +8063,7 @@ vectorizable_live_operation (stmt_vec_info stmt_info, remove_phi_node (&gsi, false); lhs_phi = gimple_phi_result (phi); gimple *copy = gimple_build_assign (lhs_phi, new_tree); - gsi_insert_after (&exit_gsi, copy, GSI_CONTINUE_LINKING); + gsi_insert_before (&exit_gsi, copy, GSI_SAME_STMT); break; } } |