From patchwork Tue Nov 22 14:25:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 127085 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 8081AB70B2 for ; Wed, 23 Nov 2011 01:25:31 +1100 (EST) Received: (qmail 20335 invoked by alias); 22 Nov 2011 14:25:30 -0000 Received: (qmail 20325 invoked by uid 22791); 22 Nov 2011 14:25:29 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Tue, 22 Nov 2011 14:25:16 +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 pAMEPGuI008728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Nov 2011 09:25:16 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAMEPFp1004594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 22 Nov 2011 09:25:16 -0500 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 pAMEPFo7013044 for ; Tue, 22 Nov 2011 15:25:15 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id pAMEPFTm013042 for gcc-patches@gcc.gnu.org; Tue, 22 Nov 2011 15:25:15 +0100 Date: Tue, 22 Nov 2011 15:25:14 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Add testcase for PR tree-optimization/50765 Message-ID: <20111122142514.GQ27242@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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! This PR got fixed by my recent vectorizable_conversion changes, in particular the truncation of the vec_oprnds[01] vectors on multistep type promotion if copies > 1. Testcase tested on x86_64-linux and i686-linux, checked in as obvious. 2011-11-22 Jakub Jelinek PR tree-optimization/50765 * gcc.dg/pr50765.c: New test. Jakub --- gcc/testsuite/gcc.dg/pr50765.c.jj 2011-11-22 11:43:17.614794630 +0100 +++ gcc/testsuite/gcc.dg/pr50765.c 2011-11-22 11:43:05.000000000 +0100 @@ -0,0 +1,10 @@ +/* PR tree-optimization/50765 */ +/* { dg-do compile } */ +/* { dg-options "-O3 -fno-tree-dce" } */ + +void +foo (long *w, long *x, unsigned char *y, int z) +{ + for (; z < 429; z++) + w[z] = (-19 ^ y[z]) & x[z]; +}