[llvm] r355727 - [x86] add tests for extracted vector FP cmp; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 12:45:28 PST 2019
Author: spatel
Date: Fri Mar 8 12:45:27 2019
New Revision: 355727
URL: http://llvm.org/viewvc/llvm-project?rev=355727&view=rev
Log:
[x86] add tests for extracted vector FP cmp; NFC
Modified:
llvm/trunk/test/CodeGen/X86/extractelement-fp.ll
Modified: llvm/trunk/test/CodeGen/X86/extractelement-fp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/extractelement-fp.ll?rev=355727&r1=355726&r2=355727&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/extractelement-fp.ll (original)
+++ llvm/trunk/test/CodeGen/X86/extractelement-fp.ll Fri Mar 8 12:45:27 2019
@@ -129,6 +129,31 @@ define double @frem_v4f64(<4 x double> %
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:
More information about the llvm-commits
mailing list