From patchwork Tue Jun 6 02:48:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 103536 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3099853vqr; Mon, 5 Jun 2023 19:49:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7uRraOY+E9KJsjC75IKEo/aEC1TligRura1f9l19lJRK67MUkDW+P7C1KGUx6RlwXC5X9I X-Received: by 2002:aa7:d758:0:b0:50d:f9b1:6918 with SMTP id a24-20020aa7d758000000b0050df9b16918mr740451eds.9.1686019776440; Mon, 05 Jun 2023 19:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686019776; cv=none; d=google.com; s=arc-20160816; b=fiXuOanvEspH7BYswmdnNLZNrB2125Iegr2QoxC4kwk6du9O5wD9Vq42/9MfCjqnnr hABAWnALKYmNtg+w6kV7kiA4FnXJzBmzcectqidc89kW9x7/zzAVpYdtXUY0Ue5icCpt hg5V6skdnFog35IuuCjWGxmCSxY4NOWJtsUK28w1SyOnFLUUyuO108bJh7gLnvwXT85F S4lhMQAzZqaoEUujI9RI+Su8k6kQ5+0y0sFI1FKyKo32DC71/LQlwRDUjw649XyEpfX9 SZ5fqG4InrqXNXhqXJUkjWhp8PKZpPVJVgcNE9BpZGByMMljlcXW4znnMF34Aroq69Zq ZpiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:date:message-id :content-transfer-encoding:mime-version:subject:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=TeIs+GB+LOsM8115WAhoyxKyNmYBUQxCQHuiZJvJ35o=; b=lFxPVR5QRSOP3leWeDk1aToucnpJyrIeqj5UECA1VUGkZCWt3NSnbm8yC+PhomT20s 7FCvjjWgKF+Sv5Z/XgqPGm9ZQ/nHnLzRBwN4n7lMtet/Bjxj6bx1i3sstp+WMmJcY7in QIPPeo7LNg4cREJenSzFiVKf9STk1F6pK5WFro5IIZlazMz85MhQP5EwEEREghDANp80 vlUwcZOka0q2uRS9KuvJTXuQIR+s2cJhR88aZZzeSw1rH+0sC5QN3ZKv7d0SohUVmigP lxbe0Mpn0+mW213XR35nVVw/QlYz4HBZukARaxw6VCkNh7RNP5OXokUESSQRXyxkug1F Z3IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=nKNku64F; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p11-20020a056402074b00b00509d1c11c4csi5517229edy.686.2023.06.05.19.49.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 19:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=nKNku64F; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F5E33858436 for ; Tue, 6 Jun 2023 02:49:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F5E33858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686019775; bh=TeIs+GB+LOsM8115WAhoyxKyNmYBUQxCQHuiZJvJ35o=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nKNku64FweHxr6wEhTc3unY3c72WARgb/enT0jSstr6tvER1uD2v1WuX2nDeYjJkT 0v6ezrNN4v4GyXXr8rQWmaLFXO0BRCTeT/1swDAdEG3oENhOrKxbRKw2+Q+6JQG+sl djSuxZAGVOJHO55aHpE3IEujr8JcaYGZ1rD/c3hI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 690893858416 for ; Tue, 6 Jun 2023 02:48:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 690893858416 To: Subject: [committed] bootstrap rtl-checking: Fix XVEC vs XVECEXP in postreload.cc MIME-Version: 1.0 Message-ID: <20230606024851.D7E7920441@pchp3.se.axis.com> Date: Tue, 6 Jun 2023 04:48:51 +0200 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hans-Peter Nilsson via Gcc-patches From: Hans-Peter Nilsson Reply-To: Hans-Peter Nilsson Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767919872681826078?= X-GMAIL-MSGID: =?utf-8?q?1767919872681826078?= Oops. Sorry. Committed as obvious. A bootstrap --enable-checking=yes,extra,rtl (same as the reporter, but not the default) with the patch completed, where a bootstrap without it failed. -- >8 -- PR bootstrap/110120 * postreload.cc (reload_cse_move2add, move2add_use_add2_insn): Use XVECEXP, not XEXP, to access first item of a PARALLEL. --- gcc/postreload.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/postreload.cc b/gcc/postreload.cc index b479d4b921ba..20e138b4fa8b 100644 --- a/gcc/postreload.cc +++ b/gcc/postreload.cc @@ -1801,7 +1801,7 @@ move2add_use_add2_insn (scalar_int_mode mode, rtx reg, rtx sym, rtx off, naked SET, or else its single_set is the first element in a PARALLEL. */ rtx *setloc = GET_CODE (PATTERN (insn)) == PARALLEL - ? &XEXP (PATTERN (insn), 0) : &PATTERN (insn); + ? &XVECEXP (PATTERN (insn), 0, 0) : &PATTERN (insn); if (*setloc == set && costs_lt_p (&newcst, &oldcst, speed)) { changed = validate_change (insn, setloc, new_set, 0); @@ -2027,7 +2027,7 @@ reload_cse_move2add (rtx_insn *first) costs_add_n_insns (&oldcst, 1); rtx *setloc = GET_CODE (PATTERN (next)) == PARALLEL - ? &XEXP (PATTERN (next), 0) : &PATTERN (next); + ? &XVECEXP (PATTERN (next), 0, 0) : &PATTERN (next); if (*setloc == set && costs_lt_p (&newcst, &oldcst, speed) && have_add2_insn (reg, new_src))