[llvm] Reland "[LoongArch] Add `isSafeToMove` hook to prevent unsafe instruction motion" (PR #167465)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 23:59:39 PST 2025


================
@@ -1993,6 +1994,10 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
       // Hard to reason about register liveness with predicated instruction.
       break;
 
+    if (!TII->isSafeToMove(*TIB, TBB, MF))
----------------
heiher wrote:

Fix: `MBB` -> `TBB`

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


More information about the llvm-commits mailing list