]> granicus.if.org Git - llvm/commit
[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)
commit52cd80dbc1f1cbd982530661572d120c9d6cc4c9
treec9249631d0f00c864af8ee67060f65e4c9a515ad
parentffaed663600183b0331798bf4032208ec17bb3b3
[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
lib/Target/ARM/ARMCodeGenPrepare.cpp
test/CodeGen/ARM/CGP/arm-cgp-calls.ll
test/CodeGen/ARM/CGP/arm-cgp-casts.ll