aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2021-08-20 14:13:37 +0100
committerJeremy Morse <jeremy.morse@sony.com>2021-08-20 14:23:32 +0100
commitc76c24e40b4abfeb12aeb094f81b311fef7b09ac (patch)
tree74255815caf21bf24a05381000215a460451bf67 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent8dc7dcdca1e0d0ce4e39305272c8021a1aed07ed (diff)
downloadllvm-c76c24e40b4abfeb12aeb094f81b311fef7b09ac.zip
llvm-c76c24e40b4abfeb12aeb094f81b311fef7b09ac.tar.gz
llvm-c76c24e40b4abfeb12aeb094f81b311fef7b09ac.tar.bz2
[DebugInfo][InstrRef] Remove a faulty assertion
This patch removes an assertion, and adds a regression test showing why the assertion is broken. For context, LocIdx is a key/index number for machine locations, so that we can describe locations as a single integer and ignore whether they're on the stack, in registers or otherwise. Back when InstrRefBasedLDV was added, I happened to bake in a "special" zero number for various reasons, which Vedant identified as undesirable in this review comment: https://reviews.llvm.org/D83047#inline-765495 . I subsequently removed that special zero number, but it looks like I didn't delete this assertion at the time, which assumes that a zero LocIdx is invalid. The attached test shows that this assertion is reachable on valid code -- on x86 $rsp always gets the LocIdx number zero, and if you transfer a variable value into it, InstrRefBasedLDV crashes on that assertion. The code might be a bit wild to be storing variables to $rsp like that, however we shouldn't crash on it. Differential Revision: https://reviews.llvm.org/D108134
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions