{DebugInfo][LSR] Don't cache dbg.value that are already undef
authorChris Jackson <chris.jackson@sony.com>
Thu, 5 Aug 2021 14:46:09 +0000 (15:46 +0100)
committerChris Jackson <chris.jackson@sony.com>
Thu, 5 Aug 2021 18:16:43 +0000 (19:16 +0100)
commit113a06f7a50010b555a0fdabc9db0a8338e2f2a8
tree2d1165a8b6dfbc5ee76f0d06eb548e77ea2384e8
parentec5137029bf267bf3b6a52f035cf02ddc1932539
{DebugInfo][LSR] Don't cache dbg.value that are already undef

The SCEV-based salvaging method caches dbg.value information pre-LSR so
that salvaging may be attempted post-LSR. If the dbg.value are already
undef pre-LSR then a salvage attempt would be fruitless, so avoid
caching them.

Reviewed By: StephenTozer

Differential Revision: https://reviews.llvm.org/D107448
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/test/Transforms/LoopStrengthReduce/pr51329.ll