[TypePromotion] Avoid some unnecessary truncs
authorSam Parker <sam.parker@arm.com>
Wed, 2 Feb 2022 10:05:15 +0000 (10:05 +0000)
committerSam Parker <sam.parker@arm.com>
Wed, 2 Feb 2022 10:05:15 +0000 (10:05 +0000)
commit281d29b8fed369c6ebe33ed85c518fc1ed81f44a
tree785b41e728a47b687f67c4f7ef0efaa7a8b6a65e
parent598983d7a96e19bb84200bed6d8c7e1968123dbe
[TypePromotion] Avoid some unnecessary truncs

Check for legal zext 'sinks' before inserting a trunc.

Differential Revision: https://reviews.llvm.org/D115451
llvm/lib/CodeGen/TypePromotion.cpp
llvm/test/Transforms/TypePromotion/AArch64/lit.local.cfg [new file with mode: 0644]
llvm/test/Transforms/TypePromotion/AArch64/phi-zext-gep.ll [new file with mode: 0644]