[ValueMapper] Preserve poison types during value mapping
authorCarl Ritson <carl.ritson@amd.com>
Mon, 6 Mar 2023 02:36:01 +0000 (11:36 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Mon, 6 Mar 2023 05:21:09 +0000 (14:21 +0900)
commit8e1038bd159638aa354144c76a07cbc1399b04dc
treedd9b3da502cbe134e3de591609a540ed7c9bf365
parent5988af93773a35bafa53d857566e7ecc0da9e329
[ValueMapper] Preserve poison types during value mapping

Poison needs to be treated directly during type remap otherwise
it will be considered an instance of undef.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D145317
llvm/lib/Transforms/Utils/ValueMapper.cpp
llvm/unittests/Transforms/Utils/ValueMapperTest.cpp