[llvm] [CodeGen] Correctly handle non-standard cases in RemoveLoadsIntoFakeUses (PR #111551)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 03:56:24 PST 2025


================
@@ -79,7 +79,7 @@ INITIALIZE_PASS_END(RemoveLoadsIntoFakeUses, DEBUG_TYPE,
 bool RemoveLoadsIntoFakeUses::runOnMachineFunction(MachineFunction &MF) {
   // Skip this pass if we would use VarLoc-based LDV, as there may be DBG_VALUE
   // instructions of the restored values that would become invalid.
-  if (debuginfoShouldUseDebugInstrRef(MF.getTarget().getTargetTriple()))
+  if (!MF.shouldUseDebugInstrRef())
----------------
jmorse wrote:

And uh, that awkwardly has an effect on the test you're writing too.

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


More information about the llvm-commits mailing list