aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-03-19 13:09:10 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-03-19 13:09:10 +0000
commit06cc324b9da1dc8fb7360a560343c28f5e7a940a (patch)
treef055ce6e171c709584dc15a25174178955a37bbf /test/CodeGen
parent415247dac4cdbec704af6caa69aff2ac63f21377 (diff)
downloadexternal_llvm-06cc324b9da1dc8fb7360a560343c28f5e7a940a.zip
external_llvm-06cc324b9da1dc8fb7360a560343c28f5e7a940a.tar.gz
external_llvm-06cc324b9da1dc8fb7360a560343c28f5e7a940a.tar.bz2
Add support for legalizing UINT_TO_FP of vectors on platforms which do
not have native support for this operation (such as X86). The legalized code uses two vector INT_TO_FP operations and is faster than scalarizing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/vec_uint_to_fp.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_uint_to_fp.ll b/test/CodeGen/X86/vec_uint_to_fp.ll
new file mode 100644
index 0000000..39e7d71
--- /dev/null
+++ b/test/CodeGen/X86/vec_uint_to_fp.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=x86 -mcpu=sandybridge | FileCheck %s
+
+; Test that we are not lowering uinttofp to scalars
+define <4 x float> @test1(<4 x i32> %A) nounwind {
+; CHECK: test1:
+; CHECK-NOT: cvtsd2ss
+; CHECK: ret
+ %C = uitofp <4 x i32> %A to <4 x float>
+ ret <4 x float> %C
+}
+