From patchwork Fri Jul 23 17:03:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 59825 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id EAA461007D2 for ; Sat, 24 Jul 2010 03:00:59 +1000 (EST) Received: (qmail 21664 invoked by alias); 23 Jul 2010 17:00:57 -0000 Received: (qmail 21650 invoked by uid 22791); 23 Jul 2010 17:00:57 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 17:00:53 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6NH0p3R012160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jul 2010 13:00:51 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6NH0o01026154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 23 Jul 2010 13:00:51 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o6NH32bE009681 for ; Fri, 23 Jul 2010 19:03:02 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o6NH32XY009679 for gcc-patches@gcc.gnu.org; Fri, 23 Jul 2010 19:03:02 +0200 Date: Fri, 23 Jul 2010 19:03:02 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix ICE in vectorizable_store (PR tree-optimization/45047) Message-ID: <20100723170302.GJ18378@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi! Another fixup for the PR44284 backport to 4.5 branch, the test was ICEing on s390-linux with -m31 -O3. Fixed thusly, committed to branch. Will commit the testcase to trunk too. 2010-07-23 Jakub Jelinek Richard Guenther PR tree-optimization/45047 * tree-vect-stmts.c (vectorizable_assignment): Return false if vectype_out is NULL for conversion statement. * gcc.c-torture/compile/pr45047.c: New test. Jakub --- gcc/tree-vect-stmts.c (revision 162467) +++ gcc/tree-vect-stmts.c (working copy) @@ -1862,6 +1862,7 @@ vectorizable_assignment (gimple stmt, gi = get_vectype_for_scalar_type (TREE_TYPE (gimple_assign_lhs (stmt))); if (CONVERT_EXPR_CODE_P (code) && (!vectype_in + || !vectype_out || (TYPE_VECTOR_SUBPARTS (vectype_out) != TYPE_VECTOR_SUBPARTS (vectype_in)) || (GET_MODE_SIZE (TYPE_MODE (vectype_out)) --- gcc/testsuite/gcc.c-torture/compile/pr45047.c (revision 0) +++ gcc/testsuite/gcc.c-torture/compile/pr45047.c (revision 0) @@ -0,0 +1,9 @@ +/* PR tree-optimization/45047 */ + +void +foo (const unsigned short *w, char *x, int y, int z) +{ + int i; + for (i = 0; i < y; i++) + x[i] = w[i] == z; +}