diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-23 04:49:39 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-23 04:49:39 +0000 |
| commit | dc13b7c637f1268744dca71cdd772b2d2f20d785 (patch) | |
| tree | 68c093db11ef1a65232d78ce7525a43c3628c83a | |
| parent | 70d57835359f5e3437a4a1de1458bbaaa9644b08 (diff) | |
| download | bcm5719-llvm-dc13b7c637f1268744dca71cdd772b2d2f20d785.tar.gz bcm5719-llvm-dc13b7c637f1268744dca71cdd772b2d2f20d785.zip | |
merge one more sse41 test into sse41.ll
llvm-svn: 76853
| -rw-r--r-- | llvm/test/CodeGen/X86/sse41-extractps-bitcast-1.ll | 19 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/sse41.ll | 44 |
2 files changed, 44 insertions, 19 deletions
diff --git a/llvm/test/CodeGen/X86/sse41-extractps-bitcast-1.ll b/llvm/test/CodeGen/X86/sse41-extractps-bitcast-1.ll deleted file mode 100644 index 470d1467159..00000000000 --- a/llvm/test/CodeGen/X86/sse41-extractps-bitcast-1.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 | not grep extractps - -; The non-store form of extractps puts its result into a GPR. -; This makes it suitable for an extract from a <4 x float> that -; is bitcasted to i32, but unsuitable for much of anything else. - -define float @bar(<4 x float> %v) { - %s = extractelement <4 x float> %v, i32 3 - %t = fadd float %s, 1.0 - ret float %t -} -define float @baz(<4 x float> %v) { - %s = extractelement <4 x float> %v, i32 3 - ret float %s -} -define i32 @qux(<4 x i32> %v) { - %i = extractelement <4 x i32> %v, i32 3 - ret i32 %i -} diff --git a/llvm/test/CodeGen/X86/sse41.ll b/llvm/test/CodeGen/X86/sse41.ll index 170280c4d40..a35de02051e 100644 --- a/llvm/test/CodeGen/X86/sse41.ll +++ b/llvm/test/CodeGen/X86/sse41.ll @@ -104,6 +104,50 @@ define i32 @extractps_2(<4 x float> %v) nounwind { %s = extractelement <4 x i32> %t, i32 3 ret i32 %s +; X32: _extractps_2: +; X32: extractps $3, %xmm0, %eax + ; X64: _extractps_2: ; X64: extractps $3, %xmm0, %eax } + + +; The non-store form of extractps puts its result into a GPR. +; This makes it suitable for an extract from a <4 x float> that +; is bitcasted to i32, but unsuitable for much of anything else. + +define float @ext_1(<4 x float> %v) nounwind { + %s = extractelement <4 x float> %v, i32 3 + %t = fadd float %s, 1.0 + ret float %t + +; X32: _ext_1: +; X32: pshufd $3, %xmm0, %xmm0 +; X32: addss LCPI8_0, %xmm0 + +; X64: _ext_1: +; X64: pshufd $3, %xmm0, %xmm0 +; X64: addss LCPI8_0(%rip), %xmm0 +} +define float @ext_2(<4 x float> %v) nounwind { + %s = extractelement <4 x float> %v, i32 3 + ret float %s + +; X32: _ext_2: +; X32: pshufd $3, %xmm0, %xmm0 + +; X64: _ext_2: +; X64: pshufd $3, %xmm0, %xmm0 +} +define i32 @ext_3(<4 x i32> %v) nounwind { + %i = extractelement <4 x i32> %v, i32 3 + ret i32 %i + +; X32: _ext_3: +; X32: pextrd $3, %xmm0, %eax + +; X64: _ext_3: +; X64: pextrd $3, %xmm0, %eax +} + + |

