xref: /llvm-project/llvm/test/Analysis/MemorySSA/pr43426.ll (revision a11faeed446882a81e79d780125d93e7199df645)
1; RUN: opt -passes=licm -S %s | FileCheck %s
2target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3target triple = "x86_64-unknown-linux-gnu"
4
5; CHECK-LABEL: @d()
6define dso_local void @d() {
7entry:
8  br label %header
9
10header:
11  store i32 1, ptr null, align 4
12  br i1 true, label %cleanup53, label %body
13
14body:
15  br i1 undef, label %cleanup31, label %for.cond11
16
17for.cond11: ; Needs branch as is
18  br i1 undef, label %unreachable, label %latch
19
20cleanup31:
21  br label %unreachable
22
23deadblock:
24  br i1 undef, label %unreachable, label %deadblock
25
26cleanup53:
27  %val = load i32, ptr null, align 4
28  %cmpv = icmp eq i32 %val, 0
29  br i1 %cmpv, label %cleanup63, label %latch
30
31latch:
32  br label %header
33
34cleanup63:
35  ret void
36
37unreachable:
38  unreachable
39}
40
41