ARM cost model: Make some vector integer to float casts cheaper
authorArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 18 Mar 2013 22:47:09 +0000 (22:47 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 18 Mar 2013 22:47:09 +0000 (22:47 +0000)
commitbf37bf9e21653f2439960d906a9c28cc19042bb0
tree9e490d438b1d6ed650da634c101d13853c16c620
parent01f25710148721f9fc2dece5eec17899ca414bcc
ARM cost model: Make some vector integer to float casts cheaper

The default logic marks them as too expensive.

For example, before this patch we estimated:
  cost of 16 for instruction:   %r = uitofp <4 x i16> %v0 to <4 x float>

While this translates to:
  vmovl.u16 q8, d16
  vcvt.f32.u32  q8, q8

All other costs are left to the values assigned by the fallback logic. Theses
costs are mostly reasonable in the sense that they get progressively more
expensive as the instruction sequences emitted get longer.

radar://13445992

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177334 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMTargetTransformInfo.cpp
test/Analysis/CostModel/ARM/cast.ll