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
11 ;CHECK-LABEL: for.cond.loopexit.split.loop.exit
12 ;CHECK-LABEL: for.cond.loopexit.split.loop.exit1
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