[ARM] Allow truncs as sources in ARM CGP
authorSam Parker <sam.parker@arm.com>
Thu, 13 Sep 2018 15:14:12 +0000 (15:14 +0000)
committerSam Parker <sam.parker@arm.com>
Thu, 13 Sep 2018 15:14:12 +0000 (15:14 +0000)
commitaaec3c62602c389e90feb98d8746c63349e81533
treeaaa746b4930804a3a7cd09464e8ed526cfef89cd
parent96f77f142ba9b399435b09ac4a77af00f641d4e9
[ARM] Allow truncs as sources in ARM CGP

We previously only allowed truncs as sinks, but now allow them as
sources too. We do this by checking that the result type is the
narrow type that we're trying to optimise for.

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

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