aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues.cpp
diff options
context:
space:
mode:
authorSander de Smalen <sander.desmalen@arm.com>2018-09-03 10:23:34 +0000
committerSander de Smalen <sander.desmalen@arm.com>2018-09-03 10:23:34 +0000
commit0c78da51323bc8840aacd9e1bc115f8aff4172a4 (patch)
tree4bbcbe3bca3b50dd3e8c915e0b7eb2caf42e1b3a /llvm/lib/CodeGen/LiveDebugValues.cpp
parent83f63e42b2e15e4bc120253b9deae00a232a787d (diff)
downloadllvm-0c78da51323bc8840aacd9e1bc115f8aff4172a4.zip
llvm-0c78da51323bc8840aacd9e1bc115f8aff4172a4.tar.gz
llvm-0c78da51323bc8840aacd9e1bc115f8aff4172a4.tar.bz2
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
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues.cpp9
1 files changed, 6 insertions, 3 deletions
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 @@ bool LiveDebugValues::isSpillInstruction(const MachineInstr &MI,
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) {