From 4e8b511063722c64a7b93032398d115d2b5c8bd4 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 14 Jun 2011 20:38:50 +0000 Subject: [PATCH] Add a test for the recent regression. llvm-svn: 133009 --- test/CodeGen/X86/undef-label.ll | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/CodeGen/X86/undef-label.ll diff --git a/test/CodeGen/X86/undef-label.ll b/test/CodeGen/X86/undef-label.ll new file mode 100644 index 00000000000..1afd93527b8 --- /dev/null +++ b/test/CodeGen/X86/undef-label.ll @@ -0,0 +1,19 @@ +; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s + +; This is a case where we would incorrectly conclude that LBB0_1 could only +; be reached via fall through and would therefore omit the label. + +; CHECK: jne .LBB0_1 +; CHECK-NEXT: jnp .LBB0_3 +; CHECK-NEXT: .LBB0_1: + +define void @xyz() { +entry: + br i1 fcmp oeq (double fsub (double undef, double undef), double 0.000000e+00), label %bar, label %foo + +foo: + br i1 fcmp ogt (double fdiv (double fsub (double fmul (double undef, double undef), double fsub (double undef, double undef)), double fmul (double undef, double undef)), double 1.0), label %foo, label %bar + +bar: + ret void +}