[llvm-branch-commits] [llvm] [X86][NewPM] Port X86FixupLEAs to NPM (PR #173744)
Aiden Grossman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Dec 28 14:27:19 PST 2025
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/173744
>From a27090769e8579b7fd7d58a7de4a3be15cf3b8e3 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sat, 27 Dec 2025 23:27:24 +0000
Subject: [PATCH 1/2] fix
Created using spr 1.3.7
---
llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup-2.mir | 2 +-
llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup.mir | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup-2.mir b/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup-2.mir
index 5e088d3f46007..828c4cafca9b3 100644
--- a/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup-2.mir
+++ b/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup-2.mir
@@ -1,4 +1,4 @@
-# RUN: llc -run-pass x86-fixup-LEAs -mtriple=i386 -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s
+# RUN: llc -run-pass x86-fixup-leas -mtriple=i386 -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s
#
# Test that several LEA => ADD transforms get substitutions applied to them,
# for corner cases that we can only hit with -mtriple=i386.
diff --git a/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup.mir b/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup.mir
index 2e28804682ba9..cf06fd4ee2bdc 100644
--- a/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup.mir
+++ b/llvm/test/DebugInfo/MIR/InstrRef/x86-lea-fixup.mir
@@ -1,6 +1,6 @@
-# RUN: llc -run-pass x86-fixup-LEAs -mtriple=x86_64-gnu-unknown -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s --check-prefixes=COREI7,CHECK
-# RUN: llc -run-pass x86-fixup-LEAs -mtriple=x86_64-gnu-unknown -verify-machineinstrs -mcpu=haswell -o - %s | FileCheck %s --check-prefixes=HASWELL,CHECK
-# RUN: llc -run-pass x86-fixup-LEAs -mtriple=x86_64-unknown-unknown -verify-machineinstrs -mcpu=atom -o - %s | FileCheck %s --check-prefixes=ATOM,CHECK
+# RUN: llc -run-pass x86-fixup-leas -mtriple=x86_64-gnu-unknown -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s --check-prefixes=COREI7,CHECK
+# RUN: llc -run-pass x86-fixup-leas -mtriple=x86_64-gnu-unknown -verify-machineinstrs -mcpu=haswell -o - %s | FileCheck %s --check-prefixes=HASWELL,CHECK
+# RUN: llc -run-pass x86-fixup-leas -mtriple=x86_64-unknown-unknown -verify-machineinstrs -mcpu=atom -o - %s | FileCheck %s --check-prefixes=ATOM,CHECK
#
# Test several LEA <=> ADD transformations that the fixup-leas pass performs,
# and check that any debug-instr-number attached to the original instruction
>From dd4083a92d24a37a38f3e4276c38fc7d79025a26 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 28 Dec 2025 03:19:13 +0000
Subject: [PATCH 2/2] fix
Created using spr 1.3.7
---
llvm/lib/Target/X86/X86FixupLEAs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/X86/X86FixupLEAs.cpp b/llvm/lib/Target/X86/X86FixupLEAs.cpp
index d13be9d3e6c8c..6bc8dc8b83145 100644
--- a/llvm/lib/Target/X86/X86FixupLEAs.cpp
+++ b/llvm/lib/Target/X86/X86FixupLEAs.cpp
@@ -943,7 +943,7 @@ PreservedAnalyses X86FixupLEAsPass::run(MachineFunction &MF,
bool Changed = PassImpl.runOnMachineFunction(MF);
if (!Changed)
return PreservedAnalyses::all();
- PreservedAnalyses PA = PreservedAnalyses::none();
+ PreservedAnalyses PA = getMachineFunctionPassPreservedAnalyses();
PA.preserveSet<CFGAnalyses>();
return PA;
}
\ No newline at end of file
More information about the llvm-branch-commits
mailing list