From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 419C93858D32 for ; Thu, 13 Apr 2023 15:07:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 419C93858D32 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-pj1-x1036.google.com with SMTP id d22-20020a17090a111600b0023d1b009f52so18416911pja.2 for ; Thu, 13 Apr 2023 08:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681398433; x=1683990433; 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=ImaeyGI9wFSKMcKLVC5itwiaI6GBMPWmsjRQg5e9UAw=; b=RawDxGLXOHCm/iIkaeSa+dMFfeThA64CGphzrS85weJ3zEJlpJwO9SzdS1NQAXt7c6 lQe9aftEKLdOLWUqAWEcuFI6eQTyZDGfH9kQjm0hBmem3Ps+XRBxyROvDOrjS3Zwz7Gq ChSrYrCT63p9Unleuk1CfyNgjhPQ6ewX0gDrt1pmyoZZYBlcrfKeJG/V8vJS7yvlbMDn w1eybYPXhyAAuhmutahzvFoL3oG3Y4yG34MruBQh+w/YD35CQ/+x/EuzK3uy+jYyOu// loGrKnSiV90Mj13wwgwsz1wDktL2HYV5XvTUlm1Oq1FD9pmP+DjO9nLW+GYI7D8q/HVC EZ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681398433; x=1683990433; 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=ImaeyGI9wFSKMcKLVC5itwiaI6GBMPWmsjRQg5e9UAw=; b=jJGNMCKuKClEt7w2yZD1Ul580HocchDnGnytb6uscPPC1pZwHBQIjL/9VcB9LOTY2P gYj26KqnKlihbLQwUUgt47xwvHdxj0CVFr1pUFlQyNwMHtWpJ7n+ZJ6610CRxCDInw/S b42xsEya0YbipwAnKZYkB+luw8JKINBb/YJhGWD8XV+8z1k6pp3hFzew0LdX+KMCn6OQ R40rSqytK3j81Jzl/YnRUrygKY6J/Uu+k7NmXDqC+lupqztrsGJxamNX69ZcJ319WFBS uu9RR2WkhaeoquHel6VnPaWqUU71qWQhtNg7HtbBNNiwq2hVZXaoInuKLPphYGH2mRNc 3ytw== X-Gm-Message-State: AAQBX9dbrD9PJxXgodis946wKrdHmZgE8pkBNlOkXm3+bbZHnSEATuCr om8/HGhfOfAa4cc96g9gB0k= X-Google-Smtp-Source: AKy350bwlATlSdcQN0KF2+hW9qgIwXNEHC3FqZqUT27+QZJu/6e0jyxWGL3FPeyt+475u7nPhxtNbQ== X-Received: by 2002:a17:90b:358e:b0:23f:b609:e704 with SMTP id mm14-20020a17090b358e00b0023fb609e704mr2299486pjb.1.1681398433103; Thu, 13 Apr 2023 08:07:13 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id 20-20020a170902ee5400b001a525705aa8sm1588390plo.136.2023.04.13.08.07.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Apr 2023 08:07:12 -0700 (PDT) Message-ID: <13c0862d-bbe9-9767-c09c-fe74d16e405b@gmail.com> Date: Thu, 13 Apr 2023 09:07:11 -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. I'll try to apply this and do just an incremental build & test to see if it resolves all the regressions. It should complete while I'm in my meeting hell. jeff