summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/fp-une-cmp.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-03-07 22:53:23 +0000
committerSanjay Patel <spatel@rotateright.com>2016-03-07 22:53:23 +0000
commit55c0dd4b263f3331a112ddd8cb4b5f9055758c86 (patch)
tree75a5fb6f3cafadc5a360140ac8a5851626ce46ec /llvm/test/CodeGen/X86/fp-une-cmp.ll
parent41bea872ddb518c4c004d649002f2937ae1d2896 (diff)
downloadbcm5719-llvm-55c0dd4b263f3331a112ddd8cb4b5f9055758c86.tar.gz
bcm5719-llvm-55c0dd4b263f3331a112ddd8cb4b5f9055758c86.zip
[x86] simplify test and tighten checks
I noticed this test as part of: http://reviews.llvm.org/D11393 ...which is confusing enough as-is. Let's show the exact codegen, so the changes will be more obvious. llvm-svn: 262874
Diffstat (limited to 'llvm/test/CodeGen/X86/fp-une-cmp.ll')
-rw-r--r--llvm/test/CodeGen/X86/fp-une-cmp.ll37
1 files changed, 22 insertions, 15 deletions
diff --git a/llvm/test/CodeGen/X86/fp-une-cmp.ll b/llvm/test/CodeGen/X86/fp-une-cmp.ll
index 7f772d11da9..e0b8f61ff6f 100644
--- a/llvm/test/CodeGen/X86/fp-une-cmp.ll
+++ b/llvm/test/CodeGen/X86/fp-une-cmp.ll
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86 -mattr=sse4.1 | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
+
; <rdar://problem/7859988>
; Make sure we don't generate more jumps than we need to. We used to generate
@@ -19,25 +21,30 @@
; addsd ...
; LBB0_2:
-; CHECK: func
-; CHECK: jne [[LABEL:.*]]
-; CHECK-NEXT: jp [[LABEL]]
-; CHECK-NOT: jmp
+define double @rdar_7859988(double %x, double %y) nounwind readnone optsize ssp {
+; CHECK-LABEL: rdar_7859988:
+; CHECK: # BB#0: # %entry
+; CHECK-NEXT: mulsd %xmm1, %xmm0
+; CHECK-NEXT: xorpd %xmm1, %xmm1
+; CHECK-NEXT: ucomisd %xmm1, %xmm0
+; CHECK-NEXT: jne .LBB0_2
+; CHECK-NEXT: jp .LBB0_2
+; CHECK-NEXT: # BB#1: # %bb1
+; CHECK-NEXT: addsd {{.*}}(%rip), %xmm0
+; CHECK-NEXT: .LBB0_2: # %bb2
+; CHECK-NEXT: retq
-define float @func(float %x, float %y) nounwind readnone optsize ssp {
entry:
- %0 = fpext float %x to double
- %1 = fpext float %y to double
- %2 = fmul double %0, %1
- %3 = fcmp une double %2, 0.000000e+00
- br i1 %3, label %bb2, label %bb1
+ %mul = fmul double %x, %y
+ %cmp = fcmp une double %mul, 0.000000e+00
+ br i1 %cmp, label %bb2, label %bb1
bb1:
- %4 = fadd double %2, -1.000000e+00
+ %add = fadd double %mul, -1.000000e+00
br label %bb2
bb2:
- %.0.in = phi double [ %4, %bb1 ], [ %2, %entry ]
- %.0 = fptrunc double %.0.in to float
- ret float %.0
+ %phi = phi double [ %add, %bb1 ], [ %mul, %entry ]
+ ret double %phi
}
+
OpenPOWER on IntegriCloud