From f84083b4dbb1ddb6d2783400f11121f490cdb5a8 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Fri, 8 Mar 2019 21:54:41 +0000 Subject: [x86] scalarize extract element 0 of FP cmp An extension of D58282 noted in PR39665: https://bugs.llvm.org/show_bug.cgi?id=39665 This doesn't answer the request to use movmsk, but that's an independent problem. We need this and probably still need scalarization of FP selects because we can't do that as a target-independent transform (although it seems likely that targets besides x86 should have this transform). llvm-svn: 355741 --- llvm/test/CodeGen/X86/extractelement-fp.ll | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'llvm/test/CodeGen/X86/extractelement-fp.ll') diff --git a/llvm/test/CodeGen/X86/extractelement-fp.ll b/llvm/test/CodeGen/X86/extractelement-fp.ll index c669a870873..300506ad720 100644 --- a/llvm/test/CodeGen/X86/extractelement-fp.ll +++ b/llvm/test/CodeGen/X86/extractelement-fp.ll @@ -132,9 +132,8 @@ define double @frem_v4f64(<4 x double> %x, <4 x double> %y) nounwind { 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: vucomiss %xmm1, %xmm0 +; CHECK-NEXT: seta %al ; CHECK-NEXT: retq %v = fcmp ogt <4 x float> %x, %y %r = extractelement <4 x i1> %v, i32 0 @@ -144,9 +143,8 @@ define i1 @fcmp_v4f32(<4 x float> %x, <4 x float> %y) nounwind { 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: vucomisd %xmm0, %xmm1 +; CHECK-NEXT: setb %al ; CHECK-NEXT: vzeroupper ; CHECK-NEXT: retq %v = fcmp ugt <4 x double> %x, %y -- cgit v1.2.3