From 08a3a793bff31ec0c6c63cf56500cdff19c05a88 Mon Sep 17 00:00:00 2001 From: Cong Hou Date: Tue, 26 Jan 2016 20:09:38 +0000 Subject: [PATCH] Add a missing test case for r258847. llvm-svn: 258848 --- test/CodeGen/X86/x86-analyze-branch-jne-jp.ll | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/CodeGen/X86/x86-analyze-branch-jne-jp.ll diff --git a/test/CodeGen/X86/x86-analyze-branch-jne-jp.ll b/test/CodeGen/X86/x86-analyze-branch-jne-jp.ll new file mode 100644 index 00000000000..fed985b7b56 --- /dev/null +++ b/test/CodeGen/X86/x86-analyze-branch-jne-jp.ll @@ -0,0 +1,21 @@ +; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux < %s | FileCheck %s -check-prefix=CHECK + +; Test if the negation of the non-equality check between floating points are +; translated to jnp followed by jne. + +; CHECK: jne +; CHECK-NEXT: jnp +define void @foo(float %f) { +entry: + %cmp = fcmp une float %f, 0.000000e+00 + br i1 %cmp, label %if.then, label %if.end + +if.then: + tail call void @a() + br label %if.end + +if.end: + ret void +} + +declare void @a()