diff mbox series

Fix remove_stmt in vectorizable_simd_clone_call (PR 86758)

Message ID 8736vybfzp.fsf@arm.com
State New
Headers show
Series Fix remove_stmt in vectorizable_simd_clone_call (PR 86758) | expand

Commit Message

Richard Sandiford Aug. 1, 2018, 9:20 a.m. UTC
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.sandiford@arm.com>

gcc/
	PR tree-optimization/86748
	* tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
	to remove pattern statements.

Comments

Richard Biener Aug. 1, 2018, 11:55 a.m. UTC | #1
On Wed, Aug 1, 2018 at 11:20 AM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> 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?

OK.

Richard.

> Richard
>
>
> 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.
>
> 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;
diff mbox series

Patch

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;