From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22013 invoked by alias); 13 Jan 2015 16:38:54 -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 22002 invoked by uid 89); 13 Jan 2015 16:38:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_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, 13 Jan 2015 16:38:51 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0DGcjfC015461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Jan 2015 11:38:45 -0500 Received: from [10.3.113.77] (ovpn-113-77.phx2.redhat.com [10.3.113.77]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0DGciln014051; Tue, 13 Jan 2015 11:38:44 -0500 Message-ID: <54B54A14.2090606@redhat.com> Date: Tue, 13 Jan 2015 17:00:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Richard Biener CC: Mike Stump , GCC Patches , Richard Sandiford , Eric Botcazou Subject: Re: shift/extract SHIFT_COUNT_TRUNCATED combine bug References: <8F47DDC3-F9FE-4E94-90F7-3A16A3FD47CE@comcast.net> <54B446B2.6080909@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00904.txt.bz2 On 01/13/15 02:51, Richard Biener wrote: >> On a SHIFT_COUNT_TRUNCATED target, I don't think it's ever OK to widen a >> shift, variable or constant. >> >> In the case of a variable shift, we could easily have eliminated the masking >> code before or during combine. For a constant shift amount we could have >> adjusted the constant (see SHIFT_COUNT_TRUNCATED in cse.c) >> >> I think it's just an oversight and it has simply never bit us before. > > IMHO SHIFT_COUNT_TRUNCATED should be removed and instead > backends should provide shift patterns with a (and:QI ...) for the > shift amount which simply will omit that operation if suitable. Perhaps. I'm certainly not wed to concept of SHIFT_COUNT_TRUNCATED. I don't see that getting addressed in the gcc-5 timeframe. aarch64, alpha, epiphany, iq2000, lm32, m32r, mep, microblaze, mips, mn103, nds32, pa, sparc, stormy16, tilepro, v850 and xtensa are the current SHIFT_COUNT_TRUNCATED targets. Jeff