[ARM][CostModel] Improve getCastInstrCost
authorSam Parker <sam.parker@arm.com>
Thu, 7 May 2020 12:21:31 +0000 (13:21 +0100)
committerSam Parker <sam.parker@arm.com>
Tue, 12 May 2020 09:32:20 +0000 (10:32 +0100)
commitb4a8091a116a8cee00d635809f3c2e585c6221c4
treefb0824e03e8eb1b9dfe6a9834f633db183c406a1
parent1952c86d6146b107770c28e9444d1b35d5dfe58d
[ARM][CostModel] Improve getCastInstrCost

- Specifically check for sext/zext users which have 'long' form NEON
  instructions.
- Add more entries to the table for sext/zexts so that we can report
  more accurately the number of vmovls required for NEON.
- Pass the instruction to the pass implementation.

Differential Revision: https://reviews.llvm.org/D79561
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/ARM/add-cast-vect.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/ARM/cast.ll
llvm/test/Analysis/CostModel/ARM/mul-cast-vect.ll [moved from llvm/test/Transforms/LoopVectorize/ARM/mul-cast-vect.ll with 100% similarity]
llvm/test/Analysis/CostModel/ARM/shl-cast-vect.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/ARM/sub-cast-vect.ll [new file with mode: 0644]