xref: /llvm-project/llvm/test/Transforms/SimplifyCFG/PR9946.ll (revision 69bd66b3ced6a295b302c6548aba11d7734c2cd7)
1; RUN: opt -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output < %s
2
3@foo = external constant i32
4
5define i32 @f() {
6entry:
7  %and = and i64 ptrtoint (ptr @foo to i64), 15
8  %cmp = icmp eq i64 %and, 0
9  br i1 %cmp, label %if.end, label %if.then
10
11if.then:                                          ; preds = %entry
12  br label %return
13
14if.end:                                           ; preds = %entry
15  br label %return
16
17return:                                           ; preds = %if.end, %if.then
18  %storemerge = phi i32 [ 1, %if.end ], [ 0, %if.then ]
19  ret i32 %storemerge
20}
21