summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyCFG/switch_create.ll
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-12-17 10:48:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-12-17 10:48:14 +0000
commite5f49c4ff2578e57c2653f19e337b21a858fae7a (patch)
tree87e5b5b1461d12c2389f3d68b534d10adc3d5194 /llvm/test/Transforms/SimplifyCFG/switch_create.ll
parenta29e1bf8ad2b8e4ea2067ec6fbf26c3c84238601 (diff)
downloadbcm5719-llvm-e5f49c4ff2578e57c2653f19e337b21a858fae7a.tar.gz
bcm5719-llvm-e5f49c4ff2578e57c2653f19e337b21a858fae7a.zip
SimplifyCFG: Ranges can be larger than 64 bits. Fixes Release-selfhost build.
llvm-svn: 122054
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/switch_create.ll')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/switch_create.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/switch_create.ll b/llvm/test/Transforms/SimplifyCFG/switch_create.ll
index 369ebc35272..da7f65a6ca3 100644
--- a/llvm/test/Transforms/SimplifyCFG/switch_create.ll
+++ b/llvm/test/Transforms/SimplifyCFG/switch_create.ll
@@ -421,3 +421,23 @@ if.end: ; preds = %if.then, %lor.lhs.f
; CHECK: ]
}
+; Don't crash on ginormous ranges.
+define void @test15(i128 %x) nounwind {
+ %cmp = icmp ugt i128 %x, 2
+ br i1 %cmp, label %if.end, label %lor.false
+
+lor.false:
+ %cmp2 = icmp ne i128 %x, 100000000000000000000
+ br i1 %cmp2, label %if.end, label %if.then
+
+if.then:
+ call void @foo1() noredzone
+ br label %if.end
+
+if.end:
+ ret void
+
+; CHECK: @test15
+; CHECK-NOT: switch
+; CHECK: ret void
+}
OpenPOWER on IntegriCloud