diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-22 16:07:56 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-22 16:07:56 +0000 |
commit | 2f8a6cdfa3bc0bfa4532da89e574666c5251cdb5 (patch) | |
tree | 7b8d1f46fdf06a86b5ac8ed24ebcc10a3dede709 /test | |
parent | 17347912b46213658074416133396caffd034e0c (diff) | |
download | external_llvm-2f8a6cdfa3bc0bfa4532da89e574666c5251cdb5.zip external_llvm-2f8a6cdfa3bc0bfa4532da89e574666c5251cdb5.tar.gz external_llvm-2f8a6cdfa3bc0bfa4532da89e574666c5251cdb5.tar.bz2 |
X86: Turn mul of <4 x i32> into pmuludq when no SSE4.1 is available.
pmuludq is slow, but it turns out that all the unpacking and packing of the
scalarized mul is even slower. 10% speedup on loop-vectorized paq8p.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/sse2-mul.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sse2-mul.ll b/test/CodeGen/X86/sse2-mul.ll new file mode 100644 index 0000000..0466d60 --- /dev/null +++ b/test/CodeGen/X86/sse2-mul.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -march=x86-64 -mcpu=core2 | FileCheck %s + +define <4 x i32> @test1(<4 x i32> %x, <4 x i32> %y) { + %m = mul <4 x i32> %x, %y + ret <4 x i32> %m +; CHECK: test1: +; CHECK: pshufd $49 +; CHECK: pmuludq +; CHECK: pshufd $49 +; CHECK: pmuludq +; CHECK: shufps $-120 +; CHECK: pshufd $-40 +; CHECK: ret +} |