1 ; RUN: opt < %s -postdomtree -analyze | FileCheck %s
2 ; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
4 @a = external global i32, align 4
8 store i32 5, i32* @a, align 4
9 %call = call i32 (...) @foo()
10 %tobool = icmp ne i32 %call, 0
11 br i1 %tobool, label %if.then, label %if.end
13 if.then: ; preds = %entry
16 loop: ; preds = %loop, %if.then
17 %0 = load i32, i32* @a, align 4
18 call void @bar(i32 %0)
21 if.end: ; preds = %entry
22 store i32 6, i32* @a, align 4
27 declare void @bar(i32)
30 ; CHECK: Inorder PostDominator Tree:
31 ; CHECK-NEXT: [1] <<exit node>>
33 ; CHECK-NEXT: [3] %if.then
34 ; CHECK: Roots: %if.end %loop