From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 3FD733858D20 for ; Thu, 13 Apr 2023 19:37:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FD733858D20 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-x535.google.com with SMTP id 41be03b00d2f7-5191796a483so922626a12.0 for ; Thu, 13 Apr 2023 12:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681414632; x=1684006632; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=eFYXn94roEblkfUKYtx7iLGFy3G+kGNPAbfjgWrmZ34=; b=ps61RDmaoSDPX1cWep/yyToTNdgso8VtK5rViWw6QO3B+m8pG80MCSKSJ1lqgWHbAZ D0En7ZqVI4XtDNAL+llWsSOe754M6w7dIP5zwUte+2/ZUmb4h2KxPgDMcSUWBv/aqgro gECYD321jg1A341BV+nSdOER72z2gCqoKGmrp72s0qcAJcpImqNay5fdt8f2EXHTcrYw 11gBx77q8vPmaHzmBo9U5wplndBoa5kcNRL6jNjxJb5x8tvqHgBxMvRihpPyR5HEEfDs D5Wj1mVXzD4OBtWhGKM/xNSHgyqWPhdell1lF1hOewVETkHVdkOVlRggZZPxn0JlWgxO eJsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681414632; x=1684006632; h=content-transfer-encoding:in-reply-to:from:references:cc: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=eFYXn94roEblkfUKYtx7iLGFy3G+kGNPAbfjgWrmZ34=; b=AOloLQkY/YpIDNi3cJltZYdsOWhh2DHJQjWGXCRdDPAJXl/lFZTHrMmwtHNYZcnLah ley0MXtPEUAZRZflC62dky2wBmba1T/RobM0I/cx26MZVNyvp1FXza8ZphqD800YZNrO TTPg6ArnVuFXGFsq9AkErXanPiYWJmyv3zufWyGocjAKrBogbS9Irc2e8OjSoBhKGRQJ PLaL1ljcXTKtu4DXefS53STliu+YquQN/vli0v27FqXnb2mWIy6f8JbgFQP51H6DIxer SaXPXGxFFXMaxSS8S82ji1O0FqO8M9eSWa1iYfZB2gpRikodC/3XzPU/IuvGmi9+mfS+ Nedg== X-Gm-Message-State: AAQBX9dzcy5ZWRT3/ltOXDIaZNiTDtjAsfp9/+r7zDjfxXrOVCwnP8ic ROsmzPAwC2+IqpA4HeLJa3g= X-Google-Smtp-Source: AKy350Z5h51vlcy1hkkFDs5XI1JVH/X7NKWQrA3E0nj2Kgnz0LAD47czRZQbqoIbugNBD8dYyf7MgA== X-Received: by 2002:a05:6a00:16c1:b0:636:4523:da93 with SMTP id l1-20020a056a0016c100b006364523da93mr4991102pfc.12.1681414631817; Thu, 13 Apr 2023 12:37:11 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id k13-20020aa7820d000000b0063b1b84d54csm1711498pfi.213.2023.04.13.12.37.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Apr 2023 12:37:11 -0700 (PDT) Message-ID: <64023eaa-9da0-14b7-5677-4da019fd6afa@gmail.com> Date: Thu, 13 Apr 2023 13:37:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] loop-iv: Fix up bounds computation Content-Language: en-US To: Jakub Jelinek Cc: Segher Boessenkool , Eric Botcazou , gcc-patches@gcc.gnu.org, Richard Biener , Richard Sandiford References: <3412470.QJadu78ljV@fomalhaut> <8d3c3861-c291-e762-a2a8-0b520f39a7e3@gmail.com> <965831db-ac9e-cc5e-3459-08b6b70fd577@gmail.com> <0760f780-ba7d-3476-1d9a-7b5f3063d63b@gmail.com> <20230413105755.GD19790@gate.crashing.org> <811f7d5a-bb26-b9d1-ed09-7d404b9c7c7f@gmail.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 4/13/23 07:45, Jakub Jelinek wrote: > On Thu, Apr 13, 2023 at 06:35:07AM -0600, Jeff Law wrote: >> Bootstrap was successful with v3, but there's hundreds of testsuite failures >> due to the simplify-rtx hunk. compile/20070520-1.c for example when >> compiled with: -O3 -funroll-loops -march=rv64gc -mabi=lp64d >> >> Thursdays are my hell day. It's unlikely I'd be able to look at this at all >> today. > > So, seems to me this is because loop-iv.cc asks for invalid RTL to be > simplified, it calls simplify_gen_binary (AND, SImode, > (subreg:SI (plus:DI (reg:DI 289 [ ivtmp_312 ]) > (const_int 4294967295 [0xffffffff])) 0), > (const_int 4294967295 [0xffffffff])) > but 0xffffffff is not valid SImode CONST_INT, and unlike previously > we no longer on WORD_REGISTER_OPERATIONS targets which have DImode > word_mode optimize that into the op0, so the invalid constant is emitted > into the IL and checking fails. > > The following patch fixes that (and we optimize that & -1 away even earlier > with that). > > Could you please just quickly try to apply this patch, make in the stage3 > directory followed by > make check-gcc RUNTESTFLAGS="... compile.exp='20070520-1.c ...'" > (with all tests that regressed previously), whether this is the only spot > or whether we need to fix some other place too? > > 2023-04-13 Jakub Jelinek > > * loop-iv.cc (iv_number_of_iterations): Use gen_int_mode instead > of GEN_INT. That fixes all the regressions and looks OK to me. jeff