1 ; RUN: opt %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
5 define i32 @basic(i32 %x) {
8 ; CHECK-NEXT: call i32 @f(i32 0)
9 ; CHECK-NEXT: ret i32 %0
12 switch i32 %x, label %default [
18 %0 = call i32 @f(i32 0)
23 define i32 @constant() {
24 ; CHECK-LABEL: @constant
26 ; CHECK-NEXT: call i32 @f(i32 1)
27 ; CHECK-NEXT: ret i32 %0
30 switch i32 42, label %default [
31 i32 41, label %default
36 %0 = call i32 @f(i32 0)
39 %1 = call i32 @f(i32 1)
42 %2 = call i32 @f(i32 2)
47 define i32 @unreachable(i32 %x) {
48 ; CHECK-LABEL: @unreachable
50 ; CHECK-NEXT: call i32 @f(i32 0)
51 ; CHECK-NEXT: ret i32 %0
54 switch i32 %x, label %unreachable [
62 %0 = call i32 @f(i32 0)