Index: lib/CodeGen/MachineInstr.cpp =================================================================== --- lib/CodeGen/MachineInstr.cpp +++ lib/CodeGen/MachineInstr.cpp @@ -1586,8 +1586,7 @@ E = memoperands_end(); I != E; ++I) { if ((*I)->isVolatile()) return false; if ((*I)->isStore()) return false; - if ((*I)->isInvariant()) return true; - + if ((*I)->isInvariant()) continue; // A load from a constant PseudoSourceValue is invariant. if (const PseudoSourceValue *PSV = (*I)->getPseudoValue())