OSDN Git Service

[DebugInfo][InstCombine] Preserve DI after combining zext
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>
Wed, 4 Jul 2018 09:55:46 +0000 (09:55 +0000)
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>
Wed, 4 Jul 2018 09:55:46 +0000 (09:55 +0000)
commitbaf68707d0039b244d37fbf0950af33edb0c50bc
tree4aef62aba3a9565a41cfdef072ab4f8ea74952d2
parentc8da7b28b97cce07b613669f06ecfecc9c776c90
[DebugInfo][InstCombine] Preserve DI after combining zext

When zext is EvaluatedInDifferentType, InstCombine
drops the dbg.value intrinsic. This patch tries to
preserve said DI, by inserting the zext's old DI in the
resulting instruction. (Only for integer type for now)

Differential Revision: https://reviews.llvm.org/D48331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336254 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/InstCombine/cast-mul-select.ll