aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-08-01 15:29:36 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-08-01 15:29:36 +0000
commit41b6b80e1a70f3731a45d991a83c5bc4a7f73ea4 (patch)
treec64db0368b9d600fe112be5217ccbe192c4ee341 /gcc
parentbeeb6ce8631cd0e23160dbbafd5f43d16a749e02 (diff)
downloadgcc-41b6b80e1a70f3731a45d991a83c5bc4a7f73ea4.zip
gcc-41b6b80e1a70f3731a45d991a83c5bc4a7f73ea4.tar.gz
gcc-41b6b80e1a70f3731a45d991a83c5bc4a7f73ea4.tar.bz2
Fix remove_stmt in vectorizable_simd_clone_call (PR 86758)
vectorizable_simd_clone_call was trying to remove a pattern statement instead of the original statement, Fixes existing tests gcc.dg/pr84452.c and gcc.target/i386/pr84309.c on x86. 2018-08-01 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/86748 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try to remove pattern statements. From-SVN: r263222
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-vect-stmts.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e7367d..6ea9771 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
+ PR tree-optimization/86748
+ * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
+ to remove pattern statements.
+
+2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
+
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
result of dfs_enumerate_from when constructing stmt_vec_infos,
instead of additionally calling get_loop_body.
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 3989fde..cfc8388 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -4368,7 +4368,7 @@ vectorizable_simd_clone_call (stmt_vec_info stmt_info,
}
else
new_stmt = gimple_build_nop ();
- vinfo->replace_stmt (gsi, stmt_info, new_stmt);
+ vinfo->replace_stmt (gsi, vect_orig_stmt (stmt_info), new_stmt);
unlink_stmt_vdef (stmt);
return true;