OSDN Git Service

[x86] fix cost of SINT_TO_FP for i32 --> float (PR21356, PR28434)
authorSanjay Patel <spatel@rotateright.com>
Wed, 6 Jul 2016 19:15:54 +0000 (19:15 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 6 Jul 2016 19:15:54 +0000 (19:15 +0000)
commit368e7e3ad1e891df6e67b00fc798b24bfe0bb341
tree2f6010818e45383afea3664396db7fea397c3b24
parent631c7c3e442e06dfab7a2a417b1d4f8a989bfdd8
[x86] fix cost of SINT_TO_FP for i32 --> float (PR21356, PR28434)

This is "cvtdq2ps" which does not appear to be particularly slow on any CPU
according to Agner's tables. Choosing "5" as a cost here as suggested in:
https://llvm.org/bugs/show_bug.cgi?id=21356
...but it seems very conservative given that the instruction is fully pipelined,
and I think these costs are supposed to model throughput.

Note that related costs are also most likely too high, but this fixes PR21356
and partly fixes PR28434.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274658 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86TargetTransformInfo.cpp
test/Analysis/CostModel/X86/sitofp.ll