[llvm] 2e091b2 - [NewPM] Properly initialize NewPM reg-bank-select (#229534)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 12:52:46 PDT 2026


Author: Mikołaj Piróg
Date: 2026-10-06T19:52:39Z
New Revision: 2e091b21db35436f9d7fcccaa8a0fdb7b48dd887

URL: https://github.com/llvm/llvm-project/commit/2e091b21db35436f9d7fcccaa8a0fdb7b48dd887
DIFF: https://github.com/llvm/llvm-project/commit/2e091b21db35436f9d7fcccaa8a0fdb7b48dd887.diff

LOG: [NewPM] Properly initialize NewPM reg-bank-select (#229534)

The NewPM initialization of the pass didn't call computeOptMode as the
legacy one does. Missed in porting:
https://github.com/llvm/llvm-project/pull/217756

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index 261193cd790ab..bac2f52c9ede0 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -1774,7 +1774,7 @@ bool RegBankSelectLegacy::runOnMachineFunction(MachineFunction &MF) {
 }
 
 RegBankSelectPass::RegBankSelectPass(RegBankSelectMode RunningMode)
-    : OptMode(RunningMode) {}
+    : OptMode(computeOptMode(RunningMode)) {}
 
 PreservedAnalyses RegBankSelectPass::run(MachineFunction &MF,
                                          MachineFunctionAnalysisManager &MFAM) {


        


More information about the llvm-commits mailing list