ARM cost model: Correct cost for some cheap float to integer conversions
authorArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 18 Mar 2013 22:47:06 +0000 (22:47 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 18 Mar 2013 22:47:06 +0000 (22:47 +0000)
commit01f25710148721f9fc2dece5eec17899ca414bcc
tree0efed68c543968169bb1aaa1a5d98758dbab6782
parente572809aa153f37a7a17726f9aac26598d60e57c
ARM cost model: Correct cost for some cheap float to integer conversions

Fix cost of some "cheap" cast instructions. Before this patch we used to
estimate for example:
  cost of 16 for instruction:   %r = fptoui <4 x float> %v0 to <4 x i16>

While we would emit:
  vcvt.s32.f32  q8, q8
  vmovn.i32 d16, q8
  vuzp.8  d16, d17

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://13434072

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