summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyCFG/switch_create.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-12-13 03:43:57 +0000
committerChris Lattner <sabre@nondot.org>2010-12-13 03:43:57 +0000
commit62cc76e9cce68b4ea7b6c3f2b00522d3fa133788 (patch)
tree472baafed6de921939293eae37debbd52d9633bf /llvm/test/Transforms/SimplifyCFG/switch_create.ll
parent11dafaa3ecf090336cd0e68bea654dbccbb614ee (diff)
downloadbcm5719-llvm-62cc76e9cce68b4ea7b6c3f2b00522d3fa133788.tar.gz
bcm5719-llvm-62cc76e9cce68b4ea7b6c3f2b00522d3fa133788.zip
Fix my previous patch to handle a degenerate case that the llvm-gcc
bootstrap buildbot tripped over. llvm-svn: 121674
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/switch_create.ll')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/switch_create.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/switch_create.ll b/llvm/test/Transforms/SimplifyCFG/switch_create.ll
index 89478700c05..e84bc379ee5 100644
--- a/llvm/test/Transforms/SimplifyCFG/switch_create.ll
+++ b/llvm/test/Transforms/SimplifyCFG/switch_create.ll
@@ -88,3 +88,26 @@ lor.end: ; preds = %lor.rhs, %lor.lhs.f
; CHECK: ]
}
+define i32 @test5(i8 zeroext %c) nounwind ssp noredzone {
+entry:
+ switch i8 %c, label %lor.rhs [
+ i8 62, label %lor.end
+ i8 34, label %lor.end
+ i8 92, label %lor.end
+ ]
+
+lor.rhs: ; preds = %entry
+ %V = icmp eq i8 %c, 92
+ br label %lor.end
+
+lor.end: ; preds = %entry, %entry, %entry, %lor.rhs
+ %0 = phi i1 [ true, %entry ], [ %V, %lor.rhs ], [ true, %entry ], [ true, %entry ]
+ %lor.ext = zext i1 %0 to i32
+ ret i32 %lor.ext
+; CHECK: @test5
+; CHECK: switch i8 %c, label %lor.rhs [
+; CHECK: i8 62, label %lor.end
+; CHECK: i8 34, label %lor.end
+; CHECK: i8 92, label %lor.end
+; CHECK: ]
+}
OpenPOWER on IntegriCloud