From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id F1B273858D1E for ; Fri, 13 Oct 2023 17:06:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1B273858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso1725887a12.3 for ; Fri, 13 Oct 2023 10:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697216807; x=1697821607; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gAK/K9HG78Nnlmz0aH2ZRXi08tYg3zFBRFDCKoLKU/4=; b=A/jtFYF/3PfoLzJj4+HZLcqANuHznPjdQ/E5fg37deyhPWpNGzZdeKp38609YiazlS so0iw3OeOfmp9kND8NHfOjrqrP1r4uw9mEyUzm9cLfWJMUH8hd+xFz5lBX4Ic0XEOKzM ZDdJm/08v6eGOXdsSWWz6Sl3zQYxcoLIghlIenmXHxNViFg/c0ipf1MoOEMaZp9vsmp0 CGMamG/TN9NiROwMEY7VNDcqSBhwO0Lt08x71L24siS8kIw4pSIJ2mMrX66akwcG0QML sn6CSySE+QN4pp6leYX+OMwNToOjIa8TCXPvBquuIABL81sF+6aesk+nKsLvU1ndDkmi brHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697216807; x=1697821607; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gAK/K9HG78Nnlmz0aH2ZRXi08tYg3zFBRFDCKoLKU/4=; b=q9AHyLhZT0YzBae3NfEB7CB7izjc3jS8ShQVqx55RCsVi/1sJkAJybY+D9wMguMBfF 88h0PJL4sg9IxagYOHjwedGHVZTacePXmjMoJSGFZESnZKip9LVOxLzWC8cC8+zDJYOb OvJ5GQrMneF8hzsu6/YG3vaw/1Bug803x1Ql2GLSELGPGRg+wF6hLBrSZIFCFpZmtmXj sctPle++55bCI4CT7blQpLf0bcsJhCD/JzyNzwFhSNK7yKqBInjrmy2wvGNTXErsbyWx hkIFU+phhT3YKTslm3iaZM/6SpXiXMVY62aEt+Nbfp1hsglPJaPa3Am4x/H4zvGcpa1r 8tQg== X-Gm-Message-State: AOJu0YwTAfxDy0W9GZOLpcOnvciYfBOlXlxJMqB/CRi3bxbTbH6cafP0 SM3EfeFRvvIH+wnsDA0SqfM= X-Google-Smtp-Source: AGHT+IEPGkiRgn+JaoJiwEJPudP5oyU1U6f+4Trg+cjt6VXbU1QPGabzeeLienJ1O57t28zWDOtQLA== X-Received: by 2002:a17:90a:9511:b0:26c:e606:f455 with SMTP id t17-20020a17090a951100b0026ce606f455mr26055250pjo.36.1697216807067; Fri, 13 Oct 2023 10:06:47 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id d8-20020a17090ae28800b0027758c7f585sm327971pjz.52.2023.10.13.10.06.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Oct 2023 10:06:46 -0700 (PDT) Message-ID: <32a98db3-9628-4eaa-83dc-2fe023c678e7@gmail.com> Date: Fri, 13 Oct 2023 11:06:42 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] combine: Fix handling of unsigned constants Content-Language: en-US To: Stefan Schulze Frielinghaus , gcc-patches@gcc.gnu.org References: <20231006074530.465276-2-stefansf@linux.ibm.com> From: Jeff Law In-Reply-To: <20231006074530.465276-2-stefansf@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 10/6/23 01:45, Stefan Schulze Frielinghaus wrote: > If a CONST_INT represents an integer of a mode with fewer bits than in > HOST_WIDE_INT, then the integer is sign extended. For those two > optimizations touched by this patch, the integers of interest have only > the most significant bit set w.r.t their mode, therefore, they were sign > extended. Thus in order to get the integer of interest, we have to chop > off the high bits. > > Bootstrapped and regtested on x64, powerpc64le, and s390. Ok for > mainline? > > gcc/ChangeLog: > > * combine.cc (simplify_compare_const): Fix handling of unsigned > constants. OK jeff