* [PATCH] Fix simd clone vectorization with EH (PR tree-optimization/63915)
@ 2014-11-18 22:17 Jakub Jelinek
2014-11-19 9:42 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2014-11-18 22:17 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
Hi!
Simd clone vectorization uses vect_finish_stmt_generation which
handles adding the new calls properly to EH tables, but afterwards
we replace the original call with a normal assignment, and if the original
call can throw, we need to remove it from the EH tables.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?
2014-11-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/63915
* tree-vect-stmts.c (vectorizable_simd_clone_call): Pass
true instead of false as last argument to gsi_replace.
* c-c++-common/gomp/pr60823-4.c: New test.
--- gcc/tree-vect-stmts.c.jj 2014-11-14 00:10:39.000000000 +0100
+++ gcc/tree-vect-stmts.c 2014-11-18 17:02:15.635257023 +0100
@@ -3195,7 +3195,7 @@ vectorizable_simd_clone_call (gimple stm
set_vinfo_for_stmt (new_stmt, stmt_info);
set_vinfo_for_stmt (stmt, NULL);
STMT_VINFO_STMT (stmt_info) = new_stmt;
- gsi_replace (gsi, new_stmt, false);
+ gsi_replace (gsi, new_stmt, true);
unlink_stmt_vdef (stmt);
return true;
--- gcc/testsuite/c-c++-common/gomp/pr60823-4.c.jj 2014-11-18 17:06:38.859319961 +0100
+++ gcc/testsuite/c-c++-common/gomp/pr60823-4.c 2014-11-18 17:06:34.602383632 +0100
@@ -0,0 +1,7 @@
+/* PR tree-optimization/63915 */
+/* { dg-do run } */
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-options "-O2 -fopenmp-simd" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+#include "pr60823-2.c"
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix simd clone vectorization with EH (PR tree-optimization/63915)
2014-11-18 22:17 [PATCH] Fix simd clone vectorization with EH (PR tree-optimization/63915) Jakub Jelinek
@ 2014-11-19 9:42 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2014-11-19 9:42 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
On Tue, 18 Nov 2014, Jakub Jelinek wrote:
> Hi!
>
> Simd clone vectorization uses vect_finish_stmt_generation which
> handles adding the new calls properly to EH tables, but afterwards
> we replace the original call with a normal assignment, and if the original
> call can throw, we need to remove it from the EH tables.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?
Ok.
Thanks,
Richard.
> 2014-11-18 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/63915
> * tree-vect-stmts.c (vectorizable_simd_clone_call): Pass
> true instead of false as last argument to gsi_replace.
>
> * c-c++-common/gomp/pr60823-4.c: New test.
>
> --- gcc/tree-vect-stmts.c.jj 2014-11-14 00:10:39.000000000 +0100
> +++ gcc/tree-vect-stmts.c 2014-11-18 17:02:15.635257023 +0100
> @@ -3195,7 +3195,7 @@ vectorizable_simd_clone_call (gimple stm
> set_vinfo_for_stmt (new_stmt, stmt_info);
> set_vinfo_for_stmt (stmt, NULL);
> STMT_VINFO_STMT (stmt_info) = new_stmt;
> - gsi_replace (gsi, new_stmt, false);
> + gsi_replace (gsi, new_stmt, true);
> unlink_stmt_vdef (stmt);
>
> return true;
> --- gcc/testsuite/c-c++-common/gomp/pr60823-4.c.jj 2014-11-18 17:06:38.859319961 +0100
> +++ gcc/testsuite/c-c++-common/gomp/pr60823-4.c 2014-11-18 17:06:34.602383632 +0100
> @@ -0,0 +1,7 @@
> +/* PR tree-optimization/63915 */
> +/* { dg-do run } */
> +/* { dg-require-effective-target vect_simd_clones } */
> +/* { dg-options "-O2 -fopenmp-simd" } */
> +/* { dg-additional-options "-fpic" { target fpic } } */
> +
> +#include "pr60823-2.c"
>
> Jakub
>
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284
(AG Nuernberg)
Maxfeldstrasse 5, 90409 Nuernberg, Germany
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-19 9:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 22:17 [PATCH] Fix simd clone vectorization with EH (PR tree-optimization/63915) Jakub Jelinek
2014-11-19 9:42 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).