[llvm] [MachineLoopInfo] Fix assertion failure on undef use operands (PR #100137)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 08:12:41 PDT 2024


================
@@ -287,7 +287,7 @@ bool MachineLoop::isLoopInvariant(MachineInstr &I,
       }
     }
 
-    if (!MO.isUse())
+    if (!MO.readsReg())
----------------
arsenm wrote:

this needs a mir test too 

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


More information about the llvm-commits mailing list