From 052876957cf80f32af2f0caac33cbc7398862a63 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 23 Jul 2009 04:43:48 +0000 Subject: [PATCH] merge another sse41 test into sse41.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76852 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/sse41-extractps-bitcast-0.ll | 12 ------------ test/CodeGen/X86/sse41.ll | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-) delete mode 100644 test/CodeGen/X86/sse41-extractps-bitcast-0.ll diff --git a/test/CodeGen/X86/sse41-extractps-bitcast-0.ll b/test/CodeGen/X86/sse41-extractps-bitcast-0.ll deleted file mode 100644 index bcfaa7a0e5a..00000000000 --- a/test/CodeGen/X86/sse41-extractps-bitcast-0.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 | grep extractps | count 2 - -define i32 @foo(<4 x float> %v) { - %s = extractelement <4 x float> %v, i32 3 - %i = bitcast float %s to i32 - ret i32 %i -} -define i32 @boo(<4 x float> %v) { - %t = bitcast <4 x float> %v to <4 x i32> - %s = extractelement <4 x i32> %t, i32 3 - ret i32 %s -} diff --git a/test/CodeGen/X86/sse41.ll b/test/CodeGen/X86/sse41.ll index f4b0854aa59..170280c4d40 100644 --- a/test/CodeGen/X86/sse41.ll +++ b/test/CodeGen/X86/sse41.ll @@ -84,3 +84,26 @@ entry: declare <4 x i32> @llvm.x86.sse41.pmovsxbd(<16 x i8>) nounwind readnone declare <4 x i32> @llvm.x86.sse41.pmovsxwd(<8 x i16>) nounwind readnone declare <2 x i64> @llvm.x86.sse41.pmovzxbq(<16 x i8>) nounwind readnone + + + + +define i32 @extractps_1(<4 x float> %v) nounwind { + %s = extractelement <4 x float> %v, i32 3 + %i = bitcast float %s to i32 + ret i32 %i + +; X32: _extractps_1: +; X32: extractps $3, %xmm0, %eax + +; X64: _extractps_1: +; X64: extractps $3, %xmm0, %eax +} +define i32 @extractps_2(<4 x float> %v) nounwind { + %t = bitcast <4 x float> %v to <4 x i32> + %s = extractelement <4 x i32> %t, i32 3 + ret i32 %s + +; X64: _extractps_2: +; X64: extractps $3, %xmm0, %eax +} -- 2.11.0