[llvm] [TwoAddressInstruction] Track MadeChange when eliminating REG_SEQUENCE (PR #173535)

Teja Alaghari via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 12 08:27:19 PST 2026


https://github.com/TejaX-Alaghari updated https://github.com/llvm/llvm-project/pull/173535

>From 95656fed4ce1954e1f67cf65e8b4f688a714b6b9 Mon Sep 17 00:00:00 2001
From: Teja Alaghari <teja.alaghari at amd.com>
Date: Thu, 25 Dec 2025 14:38:52 +0530
Subject: [PATCH] Track MadeChange when eliminating REG_SEQUENCE

---
 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 5d919b5a8000c..dbad06623754c 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1865,8 +1865,10 @@ bool TwoAddressInstructionImpl::run() {
 
       // Expand REG_SEQUENCE instructions. This will position mi at the first
       // expanded instruction.
-      if (mi->isRegSequence())
+      if (mi->isRegSequence()) {
         eliminateRegSequence(mi);
+        MadeChange = true;
+      }
 
       DistanceMap.insert(std::make_pair(&*mi, ++Dist));
 



More information about the llvm-commits mailing list