bolt/deps/llvm-18.1.8/llvm/test/Transforms/SimplifyCFG/PR9946.ll

21 lines
606 B
LLVM
Raw Normal View History

2025-02-14 19:21:04 +01:00
; RUN: opt -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output < %s
@foo = external constant i32
define i32 @f() {
entry:
%and = and i64 ptrtoint (ptr @foo to i64), 15
%cmp = icmp eq i64 %and, 0
br i1 %cmp, label %if.end, label %if.then
if.then: ; preds = %entry
br label %return
if.end: ; preds = %entry
br label %return
return: ; preds = %if.end, %if.then
%storemerge = phi i32 [ 1, %if.end ], [ 0, %if.then ]
ret i32 %storemerge
}