diff options
author | Shih-wei Liao <sliao@google.com> | 2010-02-10 11:10:31 -0800 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2010-02-10 11:10:31 -0800 |
commit | e264f62ca09a8f65c87a46d562a4d0f9ec5d457e (patch) | |
tree | 59e3d57ef656cef79afa708ae0a3daf25cd91fcf /test/CodeGen/Generic/vector-casts.ll | |
download | external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.zip external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.tar.gz external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.tar.bz2 |
Check in LLVM r95781.
Diffstat (limited to 'test/CodeGen/Generic/vector-casts.ll')
-rw-r--r-- | test/CodeGen/Generic/vector-casts.ll | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/vector-casts.ll b/test/CodeGen/Generic/vector-casts.ll new file mode 100644 index 0000000..a26918b --- /dev/null +++ b/test/CodeGen/Generic/vector-casts.ll @@ -0,0 +1,45 @@ +; RUN: llc < %s +; PR2671 + +define void @a(<2 x double>* %p, <2 x i8>* %q) { + %t = load <2 x double>* %p + %r = fptosi <2 x double> %t to <2 x i8> + store <2 x i8> %r, <2 x i8>* %q + ret void +} +define void @b(<2 x double>* %p, <2 x i8>* %q) { + %t = load <2 x double>* %p + %r = fptoui <2 x double> %t to <2 x i8> + store <2 x i8> %r, <2 x i8>* %q + ret void +} +define void @c(<2 x i8>* %p, <2 x double>* %q) { + %t = load <2 x i8>* %p + %r = sitofp <2 x i8> %t to <2 x double> + store <2 x double> %r, <2 x double>* %q + ret void +} +define void @d(<2 x i8>* %p, <2 x double>* %q) { + %t = load <2 x i8>* %p + %r = uitofp <2 x i8> %t to <2 x double> + store <2 x double> %r, <2 x double>* %q + ret void +} +define void @e(<2 x i8>* %p, <2 x i16>* %q) { + %t = load <2 x i8>* %p + %r = sext <2 x i8> %t to <2 x i16> + store <2 x i16> %r, <2 x i16>* %q + ret void +} +define void @f(<2 x i8>* %p, <2 x i16>* %q) { + %t = load <2 x i8>* %p + %r = zext <2 x i8> %t to <2 x i16> + store <2 x i16> %r, <2 x i16>* %q + ret void +} +define void @g(<2 x i16>* %p, <2 x i8>* %q) { + %t = load <2 x i16>* %p + %r = trunc <2 x i16> %t to <2 x i8> + store <2 x i8> %r, <2 x i8>* %q + ret void +} |