[ARM CGP] Fix ConvertTruncs
authorSam Parker <sam.parker@arm.com>
Fri, 15 Feb 2019 09:04:39 +0000 (09:04 +0000)
committerSam Parker <sam.parker@arm.com>
Fri, 15 Feb 2019 09:04:39 +0000 (09:04 +0000)
commit3c17cb7bc430f24ea2be9d62b5c0968f4b9aaac4
tree4b52c21789d477171db3405d428070c7f14d91f6
parent73db5c137af2bceeb6f591fd8c7fe70675cbb75c
[ARM CGP] Fix ConvertTruncs

ConvertTruncs is used to replace a trunc for an AND mask, however
this function wasn't working as expected. By performing the change
later, we can create a wide type integer mask instead of a narrow -1
value, which could then be simply removed (incorrectly). Because we
now perform this action later, it's necessary to cache the trunc type
before we perform the promotion.

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

llvm-svn: 354108
llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp
llvm/test/CodeGen/ARM/CGP/arm-cgp-calls.ll
llvm/test/CodeGen/ARM/CGP/arm-cgp-casts.ll