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)
commitae0052f114cc43c9ddcf03e6d016f7de0b0edcc2
treefab3e24b7cdeb57e89c9dbceae3624073e958488
parent6c9c3a8b9942e3a7b836949d18094d9558111dbd
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

llvm-svn: 177334
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/ARM/cast.ll