llvm-project/llvm/test/DebugInfo/MIR/InstrRef
Jeremy Morse 241f3e386c [DebugInfo][InstrRef] Fix a broken substitution method, add test coverage
This patch fixes a clearly-broken function that I absent-mindedly bodged
many months ago.

Over in D85749 I landed the substituteDebugValuesForInst, that creates
substitution records for all the def operands from one debug-labelled
instruction to the new one. Unfortunately it would crash if the two
instructions had different numbers of operands; I tried to fix this in
537f0fbe82 by adding a "max operand" parameter to the method, but then
didn't actually change the loop bound to take account of this. It passed
all the tests because.... well there wasn't any real test coverage of this
method.

This patch fixes up the loop to be bounded by the MaxOperand bound; and
adds test coverage for the x86-fixup-LEAs calls to this method, so that
it's actually tested.

Differential Revision: https://reviews.llvm.org/D105820
2021-07-20 11:45:13 +01:00
..
dbg-phis-in-ldv.mir [DebugInstrRef][3/3] Follow DBG_PHI instructions through LiveDebugValues 2021-06-29 14:45:13 +01:00
dbg-phis-merging-in-ldv.mir [DebugInstrRef][3/3] Follow DBG_PHI instructions through LiveDebugValues 2021-06-29 14:45:13 +01:00
dbg-phis-with-loops.mir [DebugInstrRef][3/3] Follow DBG_PHI instructions through LiveDebugValues 2021-06-29 14:45:13 +01:00
follow-spill-of-live-value.mir [X86] Return src/dest register from stack spill/restore recogniser 2021-07-09 18:12:30 +01:00
instr-ref-roundtrip.mir Add x86 REQUIRES to tests from 2c5f3d54c5 / D85746 2020-10-14 11:37:51 +01:00
lit.local.cfg Limit debug instr-referencing tests to X86 2020-10-22 15:04:19 +01:00
livedebugvalues_instrref_tolocs.mir [DebugInfo][InstrRef][1/4] Support transformations that widen values 2021-07-01 11:19:27 +01:00
livedebugvalues_recover_clobbers.mir [LiveDebugValues][InstrRef][1/2] Recover more clobbered variable locations 2021-06-30 16:56:25 +01:00
livedebugvalues_subreg_substitutions.mir [DebugInfo][InstrRef][2/4] Use subreg substitutions in LiveDebugValues 2021-07-01 13:07:16 +01:00
no-duplicates.mir Add x86 REQUIRES to tests from 2c5f3d54c5 / D85746 2020-10-14 11:37:51 +01:00
no-metainstrs.mir Add x86 REQUIRES to tests from 2c5f3d54c5 / D85746 2020-10-14 11:37:51 +01:00
phi-coalesce-subreg.mir [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF through all backend passes 2021-07-08 16:42:24 +01:00
phi-coalescing.mir [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF through all backend passes 2021-07-08 16:42:24 +01:00
phi-regallocd-to-stack.mir [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF through all backend passes 2021-07-08 16:42:24 +01:00
phi-through-regalloc.mir [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF through all backend passes 2021-07-08 16:42:24 +01:00
substitusions-roundtrip.mir [DebugInfo][InstrRef][1/4] Support transformations that widen values 2021-07-01 11:19:27 +01:00
survives-livedebugvars.mir [DebugInstrRef] Pass DBG_INSTR_REFs through register allocation 2020-10-22 15:51:22 +01:00
twoaddr-to-threeaddr-sub.mir [DebugInfo][InstrRef][1/4] Support transformations that widen values 2021-07-01 11:19:27 +01:00
x86-drop-compare-inst.mir [DebugInfo][InstrRef][4/4] Support DBG_INSTR_REF through all backend passes 2021-07-08 16:42:24 +01:00
x86-fixup-bw-inst-subreb.mir [DebugInfo][InstrRef][1/4] Support transformations that widen values 2021-07-01 11:19:27 +01:00
x86-fp-stackifier-drop-locations.mir [InstrRef][X86] Drop debug instruction numbers from x87 instructions 2021-07-19 15:08:27 +01:00
x86-lea-fixup-2.mir [DebugInfo][InstrRef] Fix a broken substitution method, add test coverage 2021-07-20 11:45:13 +01:00
x86-lea-fixup.mir [DebugInfo][InstrRef] Fix a broken substitution method, add test coverage 2021-07-20 11:45:13 +01:00