summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/undef-label.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-06-14 20:38:50 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-06-14 20:38:50 +0000
commit29a3aa855eed51d2f6b883955e9c9bf7b5aaab29 (patch)
treedbbc6d08bab8042b2c55f85249fd054fd552abaa /test/CodeGen/X86/undef-label.ll
parent0fc3015ae8a70152895536ddd8395ce8f6219164 (diff)
downloadllvm-29a3aa855eed51d2f6b883955e9c9bf7b5aaab29.tar.gz
llvm-29a3aa855eed51d2f6b883955e9c9bf7b5aaab29.tar.bz2
llvm-29a3aa855eed51d2f6b883955e9c9bf7b5aaab29.tar.xz
Add a test for the recent regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/undef-label.ll')
-rw-r--r--test/CodeGen/X86/undef-label.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/undef-label.ll b/test/CodeGen/X86/undef-label.ll
new file mode 100644
index 0000000000..1afd93527b
--- /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
+}