summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/sse41.ll
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2009-07-29 00:28:05 +0000
committerEric Christopher <echristo@apple.com>2009-07-29 00:28:05 +0000
commit71c6753d03d1bb27d0cf997285c425d631e5807b (patch)
treea1c2d894d43d6aab65d8ec09d9ed816f6194a5ee /test/CodeGen/X86/sse41.ll
parent28daa1024666ec9f17f11c8cca8aa22a6429b57f (diff)
downloadllvm-71c6753d03d1bb27d0cf997285c425d631e5807b.tar.gz
llvm-71c6753d03d1bb27d0cf997285c425d631e5807b.tar.bz2
llvm-71c6753d03d1bb27d0cf997285c425d631e5807b.tar.xz
Add support for gcc __builtin_ia32_ptest{z,c,nzc} intrinsics. Lower
to ptest instruction plus setcc. Revamp ptest instruction. Add test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/sse41.ll')
-rw-r--r--test/CodeGen/X86/sse41.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/CodeGen/X86/sse41.ll b/test/CodeGen/X86/sse41.ll
index 6c093a8b75..19a586f7d4 100644
--- a/test/CodeGen/X86/sse41.ll
+++ b/test/CodeGen/X86/sse41.ll
@@ -181,4 +181,19 @@ define <4 x float> @insertps_3(<4 x float> %t1, <4 x float> %t2) nounwind {
; X64: _insertps_3:
; X64: insertps $0, %xmm1, %xmm0
-} \ No newline at end of file
+}
+
+define i32 @ptestz_1(<4 x float> %t1, <4 x float> %t2) nounwind {
+ %tmp1 = call i32 @llvm.x86.sse41.ptestz(<4 x float> %t1, <4 x float> %t2) nounwind readnone
+ ret i32 %tmp1
+; X32: _ptestz_1:
+; X32: ptest %xmm1, %xmm0
+; X32: sete %al
+
+; X64: _ptestz_1:
+; X64: ptest %xmm1, %xmm0
+; X64: sete %al
+}
+
+declare i32 @llvm.x86.sse41.ptestz(<4 x float>, <4 x float>) nounwind readnone
+