Fix issue introduced by r341301 that broke buildbot.
A condition in isSpillInstruction() updates a small vector rather
than the 'FI' by-ref parameter, which was used in a subsequent
call to 'isSpillSlotObjectIndex()'. This patch fixes the condition
to check the FIs in the vector instead.
llvm-svn: 341305
diff --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp
index dbc19b0..00f5872 100644
--- a/llvm/lib/CodeGen/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues.cpp
@@ -477,9 +477,12 @@
return false;
// To identify a spill instruction, use the same criteria as in AsmPrinter.
- if (!((TII->isStoreToStackSlotPostFE(MI, FI) ||
- TII->hasStoreToStackSlot(MI, Accesses)) &&
- FrameInfo.isSpillSlotObjectIndex(FI)))
+ if (!((TII->isStoreToStackSlotPostFE(MI, FI) &&
+ FrameInfo.isSpillSlotObjectIndex(FI)) ||
+ (TII->hasStoreToStackSlot(MI, Accesses) &&
+ llvm::any_of(Accesses, [&FrameInfo](TargetInstrInfo::FrameAccess &FA) {
+ return FrameInfo.isSpillSlotObjectIndex(FA.FI);
+ }))))
return false;
auto isKilledReg = [&](const MachineOperand MO, unsigned &Reg) {