[llvm] [MachineCombiner] Don't count debug instructions in block size (PR #225765)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 18:11:06 PDT 2026


================
@@ -632,7 +632,7 @@ bool MachineCombinerImpl::combineInstructions(MachineBasicBlock *MBB) {
       if (DoRegPressureReduce &&
           getCombinerObjective(P) ==
               CombinerObjective::MustReduceRegisterPressure) {
-        if (MBB->size() > inc_threshold) {
+        if (MBB->sizeWithoutDebugLargerThan(inc_threshold)) {
----------------
pzhengqc wrote:

nit: IIRC, `DoRegPressureReduce` is false for aarch64 target. So, an aarch64 test won't be able to exercise this part of the patch.

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


More information about the llvm-commits mailing list