summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/extractelement-fp.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-03-08 20:45:27 +0000
committerSanjay Patel <spatel@rotateright.com>2019-03-08 20:45:27 +0000
commit43f098e719d022a935dd9244bcf936bd7d3d021f (patch)
treeaf1e70dbcb8f43cc8a742896b6b047673a945d72 /llvm/test/CodeGen/X86/extractelement-fp.ll
parentd4c4f7440e0031c0455f6de05a6b538d1bea388c (diff)
downloadbcm5719-llvm-43f098e719d022a935dd9244bcf936bd7d3d021f.tar.gz
bcm5719-llvm-43f098e719d022a935dd9244bcf936bd7d3d021f.zip
[x86] add tests for extracted vector FP cmp; NFC
llvm-svn: 355727
Diffstat (limited to 'llvm/test/CodeGen/X86/extractelement-fp.ll')
-rw-r--r--llvm/test/CodeGen/X86/extractelement-fp.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/extractelement-fp.ll b/llvm/test/CodeGen/X86/extractelement-fp.ll
index 0233728eb99..c669a870873 100644
--- a/llvm/test/CodeGen/X86/extractelement-fp.ll
+++ b/llvm/test/CodeGen/X86/extractelement-fp.ll
@@ -129,6 +129,31 @@ define double @frem_v4f64(<4 x double> %x, <4 x double> %y) nounwind {
ret double %r
}
+define i1 @fcmp_v4f32(<4 x float> %x, <4 x float> %y) nounwind {
+; CHECK-LABEL: fcmp_v4f32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vcmpltps %xmm0, %xmm1, %xmm0
+; CHECK-NEXT: vpextrb $0, %xmm0, %eax
+; CHECK-NEXT: # kill: def $al killed $al killed $eax
+; CHECK-NEXT: retq
+ %v = fcmp ogt <4 x float> %x, %y
+ %r = extractelement <4 x i1> %v, i32 0
+ ret i1 %r
+}
+
+define i1 @fcmp_v4f64(<4 x double> %x, <4 x double> %y) nounwind {
+; CHECK-LABEL: fcmp_v4f64:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vcmpnlepd %ymm1, %ymm0, %ymm0
+; CHECK-NEXT: vpextrb $0, %xmm0, %eax
+; CHECK-NEXT: # kill: def $al killed $al killed $eax
+; CHECK-NEXT: vzeroupper
+; CHECK-NEXT: retq
+ %v = fcmp ugt <4 x double> %x, %y
+ %r = extractelement <4 x i1> %v, i32 0
+ ret i1 %r
+}
+
define float @fsqrt_v4f32(<4 x float> %x) nounwind {
; CHECK-LABEL: fsqrt_v4f32:
; CHECK: # %bb.0:
OpenPOWER on IntegriCloud