xref: /llvm-project/llvm/test/Transforms/InstSimplify/require-dominator.ll (revision 8ee638fd175245eff88d77e1607e478db237dd41)
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(ptr, i1 %arg) #1 align 2 {
11  br i1 %arg, label %exit, label %2
12
13; <label>:2:
14  %3 = tail call ptr @_Znwm(i64 56) #10
15  %p = load ptr, ptr undef, align 8
16  %4 = icmp eq ptr %p, %3
17  br i1 %4, label %exit, label %5
18
19; <label>:6:
20  %6 = icmp eq ptr %p, null
21  br i1 %6, label %exit, label %7
22
23; <label>:8:
24  br label %exit
25
26exit:
27  ret void
28}
29
30; Function Attrs: nobuiltin
31declare ptr @_Znwm(i64)
32