[llvm] [MacroFusion] Support commutable instructions (PR #82751)

Zi Xuan Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 00:49:45 PDT 2024


================
@@ -78,7 +88,7 @@ def TestFusion: SimpleFusion<"test-fusion", "HasTestFusion", "Test Fusion",
 // CHECK-PREDICATOR-NEXT:    }
 // CHECK-PREDICATOR-NEXT:    return true;
 // CHECK-PREDICATOR-NEXT:  }
-// CHECK-PREDICATOR-NEXT:  bool isTestFusion(
----------------
zixuan-wu wrote:

Hi, @wangpc-pp , since shouldScheduleAdjacent may be entered twice, the second time with new created commute instruction which does not have parent MF, so there will be a segment fault to getMF() `auto &MRI = SecondMI.getMF()->getRegInfo();`

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


More information about the llvm-commits mailing list