[TypePromotion] Replace Zext to Truncate for the case src bitwidth is larger
authorchenglin.bi <chenglin.bi@linaro.org>
Tue, 8 Nov 2022 21:07:44 +0000 (05:07 +0800)
committerTom Stellard <tstellar@redhat.com>
Fri, 11 Nov 2022 01:00:50 +0000 (17:00 -0800)
commit6750e341b076d10a336c662ed6916500fdb20105
tree8d853b005cded71dbca6d88f8db88acb01758f73
parent58ba50a52edeff3cae9cfa3bdd0ee000873ffef9
[TypePromotion] Replace Zext to Truncate for the case src bitwidth is larger

Fix: https://github.com/llvm/llvm-project/issues/58843

Reviewed By: samtebbs

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

(cherry picked from commit 597f44409236bf7fa933a4ce18af23772e28fb43)
llvm/lib/CodeGen/TypePromotion.cpp
llvm/test/Transforms/TypePromotion/AArch64/pr58843.ll [new file with mode: 0644]