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

Mikael Holmen via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 21:50:52 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)) {
----------------
mikaelholmen wrote:

That's correct.It is the other "MBB->size(() > inc_threshold" instance that I saw problems with, and the same one that the added AArch64 testcase hits. But I thought I should change this instance here as well since it looks like having the same problem in that it also counts DBG_VALUE.

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


More information about the llvm-commits mailing list