From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8690 invoked by alias); 8 Aug 2017 01:56:25 -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 8641 invoked by uid 89); 8 Aug 2017 01:56:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*Ad:U*kenner X-HELO: vlsi1.gnat.com Received: from vlsi1.gnat.com (HELO vlsi1.gnat.com) (205.232.38.7) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Aug 2017 01:56:17 +0000 Received: by vlsi1.gnat.com (Postfix, from userid 3004) id 1386833CA8; Mon, 7 Aug 2017 21:56:16 -0400 (EDT) Date: Tue, 08 Aug 2017 01:56:00 -0000 To: Michael.Collison@arm.com Subject: RE: [PATCH] [Aarch64] Optimize subtract in shift counts Cc: gcc-patches@gcc.gnu.org, nd@arm.com, pinskia@gmail.com In-Reply-To: References: <20170807210159.86DD633CA8@vlsi1.gnat.com> Message-Id: <20170808015616.1386833CA8@vlsi1.gnat.com> From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) X-SW-Source: 2017-08/txt/msg00562.txt.bz2 > On Aarc64 SHIFT_COUNT_TRUNCATED is only true if SIMD code generation > is disabled. This is because the simd instructions can be used for > shifting but they do not truncate the shift count. In that case, the change isn't safe! Consider if the value was negative, for example. Yes, it's technically undefined, but I'm not sure I'd want to rely on that.