[llvm] Remove `br i1 undef` from some regression tests [NFC] (#115688)
[llvm-project.git] / llvm / test / Transforms / LICM / pr37323.ll
blob7e50a52b50d41d69f1a80f0b17c474b476ecf837
1 ;RUN: opt -verify-dom-info -passes='loop-simplify,require<postdomtree>,require<opt-remark-emit>,loop-mssa(licm),function(adce)' -S -o - %s | FileCheck %s
3 target triple = "x86_64-unknown-linux-gnu"
5 @c = external global i16, align 1
7 ;Make sure this test do not crash while accessing PostDomTree which is not
8 ;preserved in LICM.
10 ;CHECK-LABEL: fn1()
11 ;CHECK-LABEL: for.cond.loopexit.split.loop.exit
12 ;CHECK-LABEL: for.cond.loopexit.split.loop.exit1
13 define void @fn1() {
14 entry:
15   br label %for.cond
17 for.cond:                                         ; preds = %if.end, %for.cond1, %entry
18   %0 = phi i16 [ undef, %entry ], [ ptrtoint (ptr @c to i16), %if.end ], [ %.mux, %for.cond1 ]
19   br i1 undef, label %for.cond1, label %for.end8
21 for.cond1:                                        ; preds = %if.end, %for.cond
22   %.mux = select i1 undef, i16 undef, i16 ptrtoint (ptr @c to i16)
23   br i1 undef, label %for.cond, label %if.end
25 if.end:                                           ; preds = %for.cond1
26   br i1 undef, label %for.cond, label %for.cond1
28 for.end8:                                         ; preds = %for.cond
29   ret void