X86 cost model: Model cost for uitofp and sitofp on SSE2
authorArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 8 Apr 2013 18:05:48 +0000 (18:05 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 8 Apr 2013 18:05:48 +0000 (18:05 +0000)
commitf47d2d7f6b8b57a227b029710dd9f78f1de4dc11
tree56552b78b4bb0a4921398a3859e21d5b8ae77d4b
parent32efd25b939432d1c5b365fbb0438c3644a546f1
X86 cost model: Model cost for uitofp and sitofp on SSE2

The costs are overfitted so that I can still use the legalization factor.

For example the following kernel has about half the throughput vectorized than
unvectorized when compiled with SSE2. Before this patch we would vectorize it.

unsigned short A[1024];
double B[1024];
void f() {
  int i;
  for (i = 0; i < 1024; ++i) {
    B[i] = (double) A[i];
  }
}

radar://13599001

llvm-svn: 179033
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/X86/sitofp.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/X86/uitofp.ll [new file with mode: 0644]