aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2012-06-08 18:42:37 +0000
committerManman Ren <mren@apple.com>2012-06-08 18:42:37 +0000
commit6620ccf5d8fd6214fd0fa5a47a412c9a69a73ec2 (patch)
treefc3d73f96128c027a395321360464e36eec8f1ae
parent0076ad7eebb46c07288eec20e385dd8eaff736fb (diff)
Test case for r158160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158218 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/jump_sign.ll42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/CodeGen/X86/jump_sign.ll b/test/CodeGen/X86/jump_sign.ll
index d253e15774..1bdf49ab43 100644
--- a/test/CodeGen/X86/jump_sign.ll
+++ b/test/CodeGen/X86/jump_sign.ll
@@ -94,3 +94,45 @@ entry:
%y.x = select i1 %cmp, i32 %y, i32 %x
ret i32 %y.x
}
+; PR://13046
+define void @o() nounwind uwtable {
+entry:
+ %0 = load i16* undef, align 2
+ br i1 undef, label %if.then.i, label %if.end.i
+
+if.then.i: ; preds = %entry
+ unreachable
+
+if.end.i: ; preds = %entry
+ br i1 undef, label %sw.bb, label %sw.default
+
+sw.bb: ; preds = %if.end.i
+ br i1 undef, label %if.then44, label %if.end29
+
+if.end29: ; preds = %sw.bb
+; CHECK: o:
+; CHECK: cmp
+ %1 = urem i16 %0, 10
+ %cmp25 = icmp eq i16 %1, 0
+ %. = select i1 %cmp25, i16 2, i16 0
+ br i1 %cmp25, label %if.then44, label %sw.default
+
+sw.default: ; preds = %if.end29, %if.end.i
+ br i1 undef, label %if.then.i96, label %if.else.i97
+
+if.then.i96: ; preds = %sw.default
+ unreachable
+
+if.else.i97: ; preds = %sw.default
+ unreachable
+
+if.then44: ; preds = %if.end29, %sw.bb
+ %aModeRefSel.1.ph = phi i16 [ %., %if.end29 ], [ 3, %sw.bb ]
+ br i1 undef, label %if.then.i103, label %if.else.i104
+
+if.then.i103: ; preds = %if.then44
+ unreachable
+
+if.else.i104: ; preds = %if.then44
+ ret void
+}