Commit 41b6b80e by Richard Sandiford Committed by Richard Sandiford

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
parent beeb6ce8
2018-08-01 Richard Sandiford <richard.sandiford@arm.com> 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 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
result of dfs_enumerate_from when constructing stmt_vec_infos, result of dfs_enumerate_from when constructing stmt_vec_infos,
instead of additionally calling get_loop_body. instead of additionally calling get_loop_body.
......
...@@ -4368,7 +4368,7 @@ vectorizable_simd_clone_call (stmt_vec_info stmt_info, ...@@ -4368,7 +4368,7 @@ vectorizable_simd_clone_call (stmt_vec_info stmt_info,
} }
else else
new_stmt = gimple_build_nop (); 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); unlink_stmt_vdef (stmt);
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment