[llvm-branch-commits] [llvm] [CodeGen] Prevent register coalescer rematerialization based on target (PR #148430)

Tomer Shafir via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jul 15 09:13:27 PDT 2025


https://github.com/tomershafir updated https://github.com/llvm/llvm-project/pull/148430

>From 3d3d156da4c35e4421652d621e0a070ab2b8e5f7 Mon Sep 17 00:00:00 2001
From: tomershafir <tomer.shafir8 at gmail.com>
Date: Tue, 15 Jul 2025 19:13:17 +0300
Subject: [PATCH] fix format

Created using spr 1.3.6
---
 llvm/lib/CodeGen/RegisterCoalescer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 758fbd81e939c..e158a8ecbf7df 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1403,7 +1403,8 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
   if (!Edit.canRematerializeAt(RM, ValNo, CopyIdx))
     return false;
 
-  if (!TII->shouldReMaterializeTrivialRegDef(MF, *CopyMI, DstReg, SrcReg, LIS)) {
+  if (!TII->shouldReMaterializeTrivialRegDef(MF, *CopyMI, DstReg, SrcReg,
+                                             LIS)) {
     LLVM_DEBUG(dbgs() << "Remat prevented: " << CopyIdx << "\t" << *CopyMI);
     ++NumReMatsPrevented;
     return false;



More information about the llvm-branch-commits mailing list