{"id":2230356,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2230356/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/972898fc-8794-4b08-bfe1-882c9853f6bd@redhat.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.1/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<972898fc-8794-4b08-bfe1-882c9853f6bd@redhat.com>","date":"2026-04-29T16:11:31","name":"[pushed,LRA] : Fix a bug in finding conflicts in rematerialization","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4873943bb49dd7cf470dd90189a830a6f94695ac","submitter":{"id":4455,"url":"http://patchwork.ozlabs.org/api/1.1/people/4455/?format=json","name":"Vladimir Makarov","email":"vmakarov@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/972898fc-8794-4b08-bfe1-882c9853f6bd@redhat.com/mbox/","series":[{"id":502104,"url":"http://patchwork.ozlabs.org/api/1.1/series/502104/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=502104","date":"2026-04-29T16:11:31","name":"[pushed,LRA] : Fix a bug in finding conflicts in rematerialization","version":1,"mbox":"http://patchwork.ozlabs.org/series/502104/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2230356/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2230356/checks/","tags":{},"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=dYcEo28W;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=dYcEo28W","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5Ml70JXkz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 02:12:19 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 3496E4BBC0C6\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 16:12:17 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id B82904B99F77\n for <gcc-patches@gcc.gnu.org>; Wed, 29 Apr 2026 16:11:36 +0000 (GMT)","from mail-qk1-f200.google.com (mail-qk1-f200.google.com\n [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-625-Fjii6FAJNXm7pGXDb8_Ogw-1; Wed, 29 Apr 2026 12:11:34 -0400","by mail-qk1-f200.google.com with SMTP id\n af79cd13be357-8d654ade33aso228574385a.1\n for <gcc-patches@gcc.gnu.org>; Wed, 29 Apr 2026 09:11:33 -0700 (PDT)","from [192.168.0.111] (192-0-141-76.cpe.teksavvy.com. [192.0.141.76])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8f93c712c24sm216225585a.10.2026.04.29.09.11.31\n for <gcc-patches@gcc.gnu.org>\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Wed, 29 Apr 2026 09:11:32 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 3496E4BBC0C6","OpenDKIM Filter v2.11.0 sourceware.org B82904B99F77"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org B82904B99F77","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org B82904B99F77","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777479096; cv=none;\n b=Mrwwhq1lCCoVwtB3bPdZOKLSNl4K7OSrzs1ZA0W1JVhEyJoyyxtJcOP0i7zEXZzMCWXxoYcrQl3kKukuNqd88rSYeqNHgRLT2vyYHqs3VGJJgte9+NaIc45YPxMh7ayLM6V9wM9blDM0HE/9YuDkCIiLlyB++NjX3+q6vJburaM=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777479096; c=relaxed/simple;\n bh=gJw5zeqiCOfhMlegNu4Kli0l4yllUfj8bPZqnPmq3Y4=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To;\n b=geeHRrzKIiqUVnQK+038DKgpPz5BmpcIag5v1M7pS844HjcIMqD8W1xZ2OSJ/vqq3QjEPe+cLLDF8srKsyShpi6Y5QttCZ8x5TfTa9PT+TcyLbKWBXGeP29NGrFwjopqSFErniZXe647NCxHW2EwAeNsMc6emGP/jSgzf6ScsjE=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777479096;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type;\n bh=ySl13IYcHZPL9QFbWUx07nDYV0F8BpUvJnHpdDUdfrY=;\n b=dYcEo28WI+P86OoZSoCqtS/PxA6RnZzOXlBVztBp29EZhSO/Te2MmtL74//4kdMv+L1+8S\n 3ePXZ+cKhXRIct7hclmdwQ6CFqD9x0AufFHEu6xRF3xj0tktDJEboWp40gB/HPVYtFQEN/\n VrP2g0tlDmuFIFAT5aVpjQF8eGtp4pM=","X-MC-Unique":"Fjii6FAJNXm7pGXDb8_Ogw-1","X-Mimecast-MFC-AGG-ID":"Fjii6FAJNXm7pGXDb8_Ogw_1777479093","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777479093; x=1778083893;\n h=to:subject:from:content-language:user-agent:mime-version:date\n :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=sQEpt/NOiDeKrzawUiYLx25HLW6g+sFzYQK7hgl3fb8=;\n b=gJMrA0as7YBMkia1MmXHeByPqlpJ+M0aqZqJ7TxS+p1sU5/nTywSlqibB6doPOK6fJ\n SCQQLdL+8OqDZgO+gk4oz3a5h7H5V1JRH+yQSATbbE0HV23FhI06dF+JxU5hlebUX+eq\n 1QnccQ08Lpx/PpYaJ1oQmbZncVLGeS0TCOZaYRLg22SEESBzuVG5dET1wIa3uFZcNg7k\n 3Yp1/o04nUzCViMlbp79hU9mkfrLXCmIT3m3ecyEgRZ0aIsTmaVAu39kMI0kw7FU6NYv\n sDkNRSShKlfzBW/s9BsjtmKnPGZTpwJM44hcleCurGdPeGa9CO5EMrF/VYGOp69ej6Yz\n 8wgA==","X-Gm-Message-State":"AOJu0YzVthFWx2x76TDyZMJ5miHVa5o/YMCdtPn/u9bNnW4lsYRnV6yq\n pNEpeZFLegr5wOr0lEdlqAcyeW/wXrIrOsRyjAQJiSHCDYs223Lt6C7a0HrYrjqvKMKtFUcNv07\n cDMkaU8TiNmxGquRIQvMVznBruTMyKStQDZermMUDnAH8aqm6YslQKNzPLpLqWfFXqZzvcdR0aC\n yPP9Oxp1sUBCxveXLvJhJPKoJQn87vl09irehD5pYakbo=","X-Gm-Gg":"AeBDievXO6jMRurHWR50aVPME/gDpOd6QvdIw19MtCYq5ck/Dzp4baeYWojau0Ubpzp\n bmX2rvRS9F2cAvDB5Hm3k2iEDiBh0dcvUeJwb1B2y99utv1NoicM58E8szM5+aCEq6ThQmzw9+m\n SoL97DxLhOfGj/4MfapFJK/UAmhEwTWyDy2MgDYHxov2uSME9cNMrOWl8Y/m28VXQ8YZbxiokAR\n ABYQULs5sBtgbuUN0WOAm4PPo8r6x0IeR2xG/aoNF4EuZjfvn0WCQfPG22Z3OGmpMdiXR0BftAm\n VXyzqbsWPTFmM/+DyJdOeNmYwGE5jCTV5HU7G3aOfApUv+UVVy9tgK/vY0EBw48S5VO2Pner1HJ\n ufcSYoe4nTQnau+Ic3cBS8TYF6Va29SpqhNUeFmBXH2i5E9F/Kx02b1irAJbULUq8Cw==","X-Received":["by 2002:a05:620a:2544:b0:8d5:6e92:5b0c with SMTP id\n af79cd13be357-8f916b4a67cmr503449385a.5.1777479093334;\n Wed, 29 Apr 2026 09:11:33 -0700 (PDT)","by 2002:a05:620a:2544:b0:8d5:6e92:5b0c with SMTP id\n af79cd13be357-8f916b4a67cmr503441885a.5.1777479092660;\n Wed, 29 Apr 2026 09:11:32 -0700 (PDT)"],"Message-ID":"<972898fc-8794-4b08-bfe1-882c9853f6bd@redhat.com>","Date":"Wed, 29 Apr 2026 12:11:31 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","From":"Vladimir Makarov <vmakarov@redhat.com>","Subject":"[pushed][LRA]: Fix a bug in finding conflicts in rematerialization","To":"\"gcc-patches@gcc.gnu.org\" <gcc-patches@gcc.gnu.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"9o1Q2bcabfg8j3YXiGSUGTlmByAFYJkxV6_zyZrJdTE_1777479093","X-Mimecast-Originator":"redhat.com","Content-Type":"multipart/mixed; boundary=\"------------SwfeWLizpXqJQEDiplFDpgIN\"","Content-Language":"en-US","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"It is a fix for wrong conflict calculation for multi-regs in LRA \nrematerialization.\n\nThe patch was successfully bootstrapped and tested on x86-64, aarch64, \nand ppc64le.","diff":"commit 440691c87f1a5c87e71bce2a147d4eff59ea004d\nAuthor: Vladimir N. Makarov <vmakarov@redhat.com>\nDate:   Wed Apr 29 08:50:32 2026 -0400\n\n    [LRA]: Fix a bug in finding conflicts in rematerialization\n    \n    In LRA rematerialization wrong mode is used to find register conflicts. It\n    can result in wrong rematerialization. The patch fixes this.\n    \n    gcc/ChangeLog:\n    \n            * lra-remat.cc (reg_overlap_for_remat_p): Use the right mode for\n            regno2.\n\ndiff --git a/gcc/lra-remat.cc b/gcc/lra-remat.cc\nindex c7ae0f7b8c1..c4da3f75e59 100644\n--- a/gcc/lra-remat.cc\n+++ b/gcc/lra-remat.cc\n@@ -697,7 +697,7 @@ reg_overlap_for_remat_p (lra_insn_reg *reg, rtx_insn *insn)\n \tif (regno2 >= FIRST_PSEUDO_REGISTER)\n \t  nregs2 = 1;\n \telse\n-\t  nregs2 = hard_regno_nregs (regno2, reg->biggest_mode);\n+\t  nregs2 = hard_regno_nregs (regno2, reg2->biggest_mode);\n \n \tif ((regno2 + nregs2 - 1 >= regno && regno2 < regno + nregs)\n \t    || (regno + nregs - 1 >= regno2 && regno < regno2 + nregs2))\n","prefixes":["pushed","LRA"]}