diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2013-01-17 09:59:53 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2013-01-17 09:59:53 +0000 |
commit | 6c327f92a562d9d280bdbc3bde3c0ce269a4c65c (patch) | |
tree | 375086cd503bfd9faeb2a60210fa8a1ded341204 /test/CodeGen/X86/avx-sext.ll | |
parent | c2cbcc3acfc0e7426626331d57b35f1d6c7a4a47 (diff) |
Optimization for the following SIGN_EXTEND pairs:
v8i8 -> v8i64,
v8i8 -> v8i32,
v4i8 -> v4i64,
v4i16 -> v4i64
for AVX and AVX2.
Bug 14865.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-sext.ll')
-rwxr-xr-x | test/CodeGen/X86/avx-sext.ll | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-sext.ll b/test/CodeGen/X86/avx-sext.ll index 8d7d79db7d..5201575f12 100755 --- a/test/CodeGen/X86/avx-sext.ll +++ b/test/CodeGen/X86/avx-sext.ll @@ -142,3 +142,71 @@ define <8 x i16> @load_sext_test6(<8 x i8> *%ptr) { %Y = sext <8 x i8> %X to <8 x i16> ret <8 x i16>%Y } +; AVX: sext_1 +; AVX: vpmovsxbd +; AVX: vpmovsxdq +; AVX: vpmovsxdq +; AVX: ret +define void @sext_1(<4 x i8>* %inbuf, <4 x i64>* %outbuf) { + %v0 = load <4 x i8>* %inbuf + %r = sext <4 x i8> %v0 to <4 x i64> + store <4 x i64> %r, <4 x i64>* %outbuf + ret void +} + +; AVX: sext_2 +; AVX: vpmovsxbd +; AVX: ret +define void @sext_2(<4 x i8>* %inbuf, <4 x i32>* %outbuf) { + %v0 = load <4 x i8>* %inbuf + %r = sext <4 x i8> %v0 to <4 x i32> + store <4 x i32> %r, <4 x i32>* %outbuf + ret void +} + +; AVX: sext_3 +; AVX: vpmovsxwd +; AVX: ret +define void @sext_3(<4 x i16>* %inbuf, <4 x i32>* %outbuf) { + %v0 = load <4 x i16>* %inbuf + %r = sext <4 x i16> %v0 to <4 x i32> + store <4 x i32> %r, <4 x i32>* %outbuf + ret void +} + +; AVX: sext_4 +; AVX: vpmovsxwd +; AVX: vpmovsxdq +; AVX: vpmovsxdq +; AVX: ret +define void @sext_4(<4 x i16>* %inbuf, <4 x i64>* %outbuf) { + %v0 = load <4 x i16>* %inbuf + %r = sext <4 x i16> %v0 to <4 x i64> + store <4 x i64> %r, <4 x i64>* %outbuf + ret void +} + +; AVX: sext_5 +; AVX: vpmovsxbw +; AVX: vpmovsxwd +; AVX: vpmovsxwd +; AVX: vpmovsxdq +; AVX: ret +define void @sext_5(<8 x i8>* %inbuf, <8 x i64>* %outbuf) { + %v0 = load <8 x i8>* %inbuf + %r = sext <8 x i8> %v0 to <8 x i64> + store <8 x i64> %r, <8 x i64>* %outbuf + ret void +} +; AVX: sext_6 +; AVX: vpmovsxbw +; AVX: vpmovsxwd +; AVX: vpmovsxwd +; AVX: ret +define void @sext_6(<8 x i8>* %inbuf, <8 x i32>* %outbuf) { + %v0 = load <8 x i8>* %inbuf + %r = sext <8 x i8> %v0 to <8 x i32> + store <8 x i32> %r, <8 x i32>* %outbuf + ret void +} + |