[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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354108 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed