diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-03-29 21:41:55 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-03-29 21:41:55 +0000 |
commit | 143f9aea2b73a4d7be47c51efd8d353231cc49c8 (patch) | |
tree | 87aa40497ccc7911ed641bc71d36bd4921948fa7 /llvm/test/CodeGen | |
parent | eba8f834792c7ce330d3efb89f098d2031b2e3c0 (diff) | |
download | bcm5719-llvm-143f9aea2b73a4d7be47c51efd8d353231cc49c8.tar.gz bcm5719-llvm-143f9aea2b73a4d7be47c51efd8d353231cc49c8.zip |
Add Neon SINT_TO_FP and UINT_TO_FP lowering from v4i16 to v4f32. Fixes
<rdar://problem/8875309> and <rdar://problem/9057191>.
llvm-svn: 128492
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/ARM/int-to-fp.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/int-to-fp.ll b/llvm/test/CodeGen/ARM/int-to-fp.ll new file mode 100644 index 00000000000..889b1491984 --- /dev/null +++ b/llvm/test/CodeGen/ARM/int-to-fp.ll @@ -0,0 +1,19 @@ +; RUN: llc < %s | FileCheck %s +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32" +target triple = "thumbv7-apple-darwin10.0.0" + +; CHECK: sint_to_fp +; CHECK: vmovl.s16 +; CHECK: vcvt.f32.s32 +define <4 x float> @sint_to_fp(<4 x i16> %x) nounwind ssp { + %a = sitofp <4 x i16> %x to <4 x float> + ret <4 x float> %a +} + +; CHECK: uint_to_fp +; CHECK: vmovl.u16 +; CHECK: vcvt.f32.u32 +define <4 x float> @uint_to_fp(<4 x i16> %x) nounwind ssp { + %a = uitofp <4 x i16> %x to <4 x float> + ret <4 x float> %a +} |