]> granicus.if.org Git - llvm/commit
[ARM][CGP] Check trunc type before replacing
authorSam Parker <sam.parker@arm.com>
Wed, 23 Jan 2019 09:18:44 +0000 (09:18 +0000)
committerSam Parker <sam.parker@arm.com>
Wed, 23 Jan 2019 09:18:44 +0000 (09:18 +0000)
commit1bba626c445d7e29d0fce43b90a9dd024f4f78b2
tree1e700f1893bd99d01aac69e6f65f7122831c08d7
parent1284ee3c47bab17ec081b5169633aea4f8abfd30
[ARM][CGP] Check trunc type before replacing

In the last stage of type promotion, we replace any zext that uses a
new trunc with the operand of the trunc. This is okay when we only
allowed one type to be optimised, but now its the case that the trunc
maybe needed to produce a more narrow type than the one we were
optimising for. So we need to check this before doing the replacement.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351935 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMCodeGenPrepare.cpp
test/CodeGen/ARM/CGP/arm-cgp-casts.ll