diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-03-08 21:54:41 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-03-08 21:54:41 +0000 |
commit | f84083b4dbb1ddb6d2783400f11121f490cdb5a8 (patch) | |
tree | 84e1602ac6f67df3901c30cb45cda83ee62eabc4 /llvm/test/CodeGen/X86/extractelement-fp.ll | |
parent | a8b3eb46b57d2a6e50e1352b7c590d2338c5c2e8 (diff) | |
download | bcm5719-llvm-f84083b4dbb1ddb6d2783400f11121f490cdb5a8.tar.gz bcm5719-llvm-f84083b4dbb1ddb6d2783400f11121f490cdb5a8.zip |
[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
Diffstat (limited to 'llvm/test/CodeGen/X86/extractelement-fp.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/extractelement-fp.ll | 10 |
1 files changed, 4 insertions, 6 deletions
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 |