[llvm] A SCHED_BARRIER in a bundle should not prevent other SCHED_BARRIERs to be considered (PR #152627)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 20:55:58 PDT 2025


================
@@ -2508,7 +2508,9 @@ bool SchedGroup::canAddSU(SUnit &SU) const {
     ++E;
 
   // Return true if all of the bundled MIs can be added to this group.
-  return std::all_of(B, E, [this](MachineInstr &MI) { return canAddMI(MI); });
+  return std::all_of(B, E, [this](MachineInstr &MI) {
+    return (MI.isMetaInstruction()) || canAddMI(MI);
----------------
arsenm wrote:

```suggestion
    return MI.isMetaInstruction() || canAddMI(MI);
```

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


More information about the llvm-commits mailing list