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.
This relies on a function added by: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01825.html which can be applied independently of the rest of the series. Sorry for the breakage. It looks like I compared the x86 results with the wrong baseline. :-( Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf and x86_64-linux-gnu. OK to install? Richard 2018-08-01 Richard Sandiford <richard.sandif...@arm.com> gcc/ PR tree-optimization/86748 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try to remove pattern statements. Index: gcc/tree-vect-stmts.c =================================================================== --- gcc/tree-vect-stmts.c 2018-08-01 10:12:54.801835439 +0100 +++ gcc/tree-vect-stmts.c 2018-08-01 10:13:17.629637260 +0100 @@ -4368,7 +4368,7 @@ vectorizable_simd_clone_call (stmt_vec_i } 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;