aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG/switch-to-icmp.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SimplifyCFG/switch-to-icmp.ll')
-rw-r--r--test/Transforms/SimplifyCFG/switch-to-icmp.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/switch-to-icmp.ll b/test/Transforms/SimplifyCFG/switch-to-icmp.ll
index 414f8475bc..e9a6db45cb 100644
--- a/test/Transforms/SimplifyCFG/switch-to-icmp.ll
+++ b/test/Transforms/SimplifyCFG/switch-to-icmp.ll
@@ -37,3 +37,21 @@ lor.end:
; CHECK: @test2
; CHECK: %switch = icmp ult i32 %x, 2
}
+
+define i32 @test3(i1 %flag) {
+entry:
+ switch i1 %flag, label %bad [
+ i1 true, label %good
+ i1 false, label %good
+ ]
+
+good:
+ ret i32 0
+
+bad:
+ ret i32 1
+
+; CHECK: @test3
+; CHECK: entry:
+; CHECK-NEXT: ret i32 0
+}