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