From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 825E03857723 for ; Mon, 27 Nov 2023 17:57:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 825E03857723 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 825E03857723 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701107851; cv=none; b=wQsxcPsKu3qUvKWHw+4YhFhe3yxPDq4YMVNxC1Di98Wv/gMrh6cnbMOqjykHu9uZMEqTpVLmqPkPGqMPD7F2WT0C1gjFXKp49a+QIbEGtiBgt8SH4jdZpFdW8ow/2SP63gs0NrQ8eQDv0nRIybIJkFAdQzLAavRAMTWrDJIeduU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701107851; c=relaxed/simple; bh=cUHuX0D7A08+mA+6PlEwa2yG4IGCijEh7IlhbpdUDwU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=jpSQVCdtU2Cxu8Ss0NRhyk8EaGk3uYeVIaSir6DhLDWfE0xoaimVEse8POnhACRsIJw4by0nkVAbruQ3aC+qmkvIN9z8/JQsiglhh8970MvynaO98nEutLnD893Ygoglaq4DUmIdGcM2CDA1JNGtUtQ6TItlYod2OxgkX9E3aOo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-280260db156so4127567a91.2 for ; Mon, 27 Nov 2023 09:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1701107848; x=1701712648; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3Wv32g+7KdC8WOal427AozmAC7P93jIUD/PcuZbpzwM=; b=RbXlkdn3DrDA6NGKQ0yBfzvb3gJ1iz0pdaMx09B/HF6Mdx3eZqH63CRhB5YGef/u+a pF14UZD9Fk8Xv/cg4SiymWWs5VgjV8tn0YPu9ybJW6asnxkJ9MAFOhXc9ujgi3GMfqHN rbsO5DI3YcK78uOkLVLN02kb9aoLxayzXVbJZMnNiiCXL6RIyYu6a46t3q0hLLkKVKiR UlRdLtHvjzC3PmujeVX/FiWucNEKl74U6bzhH8ai3DrYIW9yFe7O49Rmphw/vZmZkYa2 lDIjUklMuaclbtSW37hRQj/60cSOgdIo3CakuXseXuSGShMdFjECfx/zCQAyUJgOgSdf 9Xjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701107848; x=1701712648; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3Wv32g+7KdC8WOal427AozmAC7P93jIUD/PcuZbpzwM=; b=owFmBc+2h8SdVNmCPQWiwZWOznvkFbETx38HxJGEhZElJ5YRrtyVApEs2n4UDESsEN nVoVXGajwsGQf3qj9axbhcZ8h45IRjclKbvLRY7Uo1rJ0qdyhaSewj5lUn5+b7Ga6rfW 9KHlE/EYne+AYc2pfQDmrC51Zq9367r/RaSmIAM081ytAPQzY+5ntnlB+gEQJdSNWBES LPoNWTjyTeYyKGXHg9NSWvbrWZ0bjzur+TltFZIVJTgsaJwocYOCZjV0IowKmtlXRiL/ 8WGfBjBhsC52kmwzgRYWaPXA6R3KeKClm4MJzFdgu0B1meoDgH+Rko61wGUowKCF8EPy beLQ== X-Gm-Message-State: AOJu0YyLxb4iIBEZTSHEoMxZFumVBQKXOCMJzL6g19GAdQJ4Jpd/6D2t KIEPgtRXnV54WuYy5ZXY4Zr+J2B4WyR3VQ3i0qFivX+nvj4hOT8MSIg= X-Google-Smtp-Source: AGHT+IFQsGQraoyyQbEcd8VBYuOgjNVpGmsi/Bs9RvstILTGMRf250XnFi1pP9f+BU5Ul3aazZ8VR2OkTYE1Yt5we+Y= X-Received: by 2002:a17:90b:4aca:b0:285:a179:7177 with SMTP id mh10-20020a17090b4aca00b00285a1797177mr9537785pjb.44.1701107848370; Mon, 27 Nov 2023 09:57:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Joern Rennecke Date: Mon, 27 Nov 2023 17:57:17 +0000 Message-ID: Subject: Re: [RFA] New pass for sign/zero extension elimination To: GCC Patches Cc: jlaw@ventanamicro.com, richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/20/23 11:26, Richard Sandiford wrote: >> + /* ?!? What is the point of this adjustment to DST_MASK? */ >> + if (code == PLUS || code == MINUS >> + || code == MULT || code == ASHIFT) >> + dst_mask >> + = dst_mask ? ((2ULL << floor_log2 (dst_mask)) - 1) : 0; > > Yeah, sympathise with the ?!? here :) Jeff Law: > Inherited. Like the other bit of magic I think I'll do a test with them > pulled out to see if I can make something undesirable trigger. This represents the carry effect. Even if the destination only cares about some high order bits, you have to consider all lower order bits of the inputs. For ASHIFT, you could refine this in the case of a constant shift count.