[llvm] [NewPM][AArch64][GlobalISel] Port AArch64PostLegalizerCombiner to NewPM (PR #194156)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 02:46:32 PDT 2026


================
@@ -910,17 +829,147 @@ bool AArch64PostLegalizerCombiner::optimizeConsecutiveMemOpAddressing(
   return Changed;
 }
 
-char AArch64PostLegalizerCombiner::ID = 0;
-INITIALIZE_PASS_BEGIN(AArch64PostLegalizerCombiner, DEBUG_TYPE,
+bool runCombiner(MachineFunction &MF, GISelCSEInfo *CSEInfo,
+                 GISelValueTracking *VT, MachineDominatorTree *MDT,
+                 const AArch64PostLegalizerCombinerImplRuleConfig &RuleConfig,
+                 bool EnableOpt, bool IsOptNone) {
+  if (MF.getProperties().hasFailedISel())
+    return false;
+  assert(MF.getProperties().hasLegalized() && "Expected a legalized function?");
----------------
arsenm wrote:

```suggestion
```

This should be enforced by the getRequiredProperties hook 

https://github.com/llvm/llvm-project/pull/194156


More information about the llvm-commits mailing list