From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16205 invoked by alias); 18 Nov 2014 22:08:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16196 invoked by uid 89); 18 Nov 2014 22:08:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 18 Nov 2014 22:08:51 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAIM8o8h013927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Nov 2014 17:08:50 -0500 Received: from tucnak.zalov.cz (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAIM8m8d017618 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 18 Nov 2014 17:08:49 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id sAIM8lsB013889; Tue, 18 Nov 2014 23:08:47 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id sAIM8k0q013888; Tue, 18 Nov 2014 23:08:46 +0100 Date: Tue, 18 Nov 2014 22:17:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix simd clone vectorization with EH (PR tree-optimization/63915) Message-ID: <20141118220846.GU1745@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg02367.txt.bz2 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 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