summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/fp-logic.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-09-23 17:00:06 +0000
committerSanjay Patel <spatel@rotateright.com>2015-09-23 17:00:06 +0000
commitdf2495f3316bf3a09f50d7f11c83e36a36031764 (patch)
treeac5d896d51b6eee119665a4655d04a9ca1ee936f /llvm/test/CodeGen/X86/fp-logic.ll
parent979840d31fab3d8597e618e7a1b89b13f838079b (diff)
downloadbcm5719-llvm-df2495f3316bf3a09f50d7f11c83e36a36031764.tar.gz
bcm5719-llvm-df2495f3316bf3a09f50d7f11c83e36a36031764.zip
[x86] replace integer 'and' ops with packed SSE FP 'and' ops when operating on FP scalars
Turn this: movd %xmm0, %eax movd %xmm1, %ecx andl %eax, %ecx movd %ecx, %xmm0 into this: andps %xmm1, %xmm0 This is related to, but does not solve: https://llvm.org/bugs/show_bug.cgi?id=22428 Differential Revision: http://reviews.llvm.org/D13065 llvm-svn: 248395
Diffstat (limited to 'llvm/test/CodeGen/X86/fp-logic.ll')
-rw-r--r--llvm/test/CodeGen/X86/fp-logic.ll15
1 files changed, 4 insertions, 11 deletions
diff --git a/llvm/test/CodeGen/X86/fp-logic.ll b/llvm/test/CodeGen/X86/fp-logic.ll
index d047f7742c8..0b714ffe36f 100644
--- a/llvm/test/CodeGen/X86/fp-logic.ll
+++ b/llvm/test/CodeGen/X86/fp-logic.ll
@@ -142,9 +142,8 @@ define float @f8(float %x) {
define i32 @f9(float %x, float %y) {
; CHECK-LABEL: f9:
; CHECK: # BB#0:
-; CHECK-NEXT: movd %xmm0, %ecx
-; CHECK-NEXT: movd %xmm1, %eax
-; CHECK-NEXT: andl %ecx, %eax
+; CHECK-NEXT: andps %xmm1, %xmm0
+; CHECK-NEXT: movd %xmm0, %eax
; CHECK-NEXT: retq
%bc1 = bitcast float %x to i32
@@ -158,10 +157,7 @@ define i32 @f9(float %x, float %y) {
define float @f10(float %x, float %y) {
; CHECK-LABEL: f10:
; CHECK: # BB#0:
-; CHECK-NEXT: movd %xmm0, %eax
-; CHECK-NEXT: movd %xmm1, %ecx
-; CHECK-NEXT: andl %eax, %ecx
-; CHECK-NEXT: movd %ecx, %xmm0
+; CHECK-NEXT: andps %xmm1, %xmm0
; CHECK-NEXT: retq
%bc1 = bitcast float %x to i32
@@ -208,10 +204,7 @@ define float @xor(float %x, float %y) {
define double @doubles(double %x, double %y) {
; CHECK-LABEL: doubles:
; CHECK: # BB#0:
-; CHECK-NEXT: movd %xmm0, %rax
-; CHECK-NEXT: movd %xmm1, %rcx
-; CHECK-NEXT: andq %rax, %rcx
-; CHECK-NEXT: movd %rcx, %xmm0
+; CHECK-NEXT: andpd %xmm1, %xmm0
; CHECK-NEXT: retq
%bc1 = bitcast double %x to i64
OpenPOWER on IntegriCloud