From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5889 invoked by alias); 13 Jan 2015 17:38:46 -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 5880 invoked by uid 89); 13 Jan 2015 17:38:45 -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,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 13 Jan 2015 17:38:44 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id t0DHcZrq009356; Tue, 13 Jan 2015 11:38:35 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id t0DHcYTD009355; Tue, 13 Jan 2015 11:38:34 -0600 Date: Tue, 13 Jan 2015 18:25:00 -0000 From: Segher Boessenkool To: Richard Biener Cc: Jeff Law , Mike Stump , GCC Patches , Richard Sandiford , Eric Botcazou Subject: Re: shift/extract SHIFT_COUNT_TRUNCATED combine bug Message-ID: <20150113173834.GA6963@gate.crashing.org> References: <8F47DDC3-F9FE-4E94-90F7-3A16A3FD47CE@comcast.net> <54B446B2.6080909@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00912.txt.bz2 On Tue, Jan 13, 2015 at 10:51:27AM +0100, Richard Biener wrote: > 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. Note that that catches less though, e.g. in int f(int x, int n) { return x << ((2*n) & 31); } without SHIFT_COUNT_TRUNCATED it will try to match an AND with 30, not with 31. Segher