1; RUN: opt < %s -instsimplify
2
3; instsimplify pass should explicitly require DominatorTreeAnalysis
4; This test will segfault if DominatorTree is not available
5
6target triple = "x86_64-grtev4-linux-gnu"
7
8; Function Attrs: nounwind uwtable
9define void @foo(i16 *) #1 align 2 {
10  br i1 undef, label %exit, label %2
11
12; <label>:2:
13  %3 = tail call i8* @_Znwm(i64 56) #10
14  %4 = bitcast i8* %3 to i16*
15  %p = load i16*, i16** undef, align 8
16  %5 = icmp eq i16* %p, %4
17  br i1 %5, label %exit, label %6
18
19; <label>:6:
20  %7 = icmp eq i16* %p, null
21  br i1 %7, label %exit, label %8
22
23; <label>:8:
24  br label %exit
25
26exit:
27  ret void
28}
29
30; Function Attrs: nobuiltin
31declare i8* @_Znwm(i64)
32