[AArch64][NFC] NFC for const vector as Instruction operand (#116790)
[llvm-project.git] / llvm / test / Transforms / CodeExtractor / live_shrink_hoist.ll
blob6f63bca00c6333726a83fd1eeed66f0a58326217
1 ; RUN: opt -S -passes=partial-inliner -max-num-inline-blocks=3 -skip-partial-inlining-cost-analysis  < %s |   FileCheck %s
2 ; RUN: opt -S -passes=partial-inliner -max-num-inline-blocks=2  -skip-partial-inlining-cost-analysis < %s   | FileCheck %s
4 %class.A = type { i32 }
6 @cond = local_unnamed_addr global i32 0, align 4
8 ; Function Attrs: uwtable
9 define void @_Z3foov() local_unnamed_addr  {
10 bb:
11   %tmp = alloca %class.A, align 4
12   call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp)
13   %tmp2 = load i32, ptr @cond, align 4, !tbaa !2
14   %tmp3 = icmp eq i32 %tmp2, 0
15   br i1 %tmp3, label %bb4, label %bb9
17 bb4:                                              ; preds = %bb
18   %foo = icmp eq i32 %tmp2, 0
19   br i1 %foo, label %bb5, label %bb9
21 bb5:                                              ; preds = %bb4
22   call void @_ZN1A7memfuncEv(ptr nonnull %tmp)
23   %tmp6 = load i32, ptr %tmp, align 4, !tbaa !6
24   %tmp7 = icmp sgt i32 %tmp6, 0
25   br i1 %tmp7, label %bb9, label %bb8
27 bb8:                                              ; preds = %bb4
28   call void @_ZN1A7memfuncEv(ptr nonnull %tmp)
29   br label %bb9
31 bb9:                                              ; preds = %bb8, %bb4, %bb
32   call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp)
33   ret void
36 ; Function Attrs: argmemonly nounwind
37 declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
39 declare void @_ZN1A7memfuncEv(ptr) local_unnamed_addr
41 ; Function Attrs: argmemonly nounwind
42 declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
44 ; Function Attrs: uwtable
45 define void @_Z3goov() local_unnamed_addr  {
46 bb:
47   tail call void @_Z3foov()
48   ret void
51 ; CHECK-LABEL: define internal void @_Z3foov.1.
52 ; CHECK: bb9:
53 ; CHECK: call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp)
54 ; CHECK:  br label %.exitStub
58 !llvm.module.flags = !{!0}
59 !llvm.ident = !{!1}
61 !0 = !{i32 1, !"wchar_size", i32 4}
62 !1 = !{!"clang version 5.0.0 (trunk 304489)"}
63 !2 = !{!3, !3, i64 0}
64 !3 = !{!"int", !4, i64 0}
65 !4 = !{!"omnipotent char", !5, i64 0}
66 !5 = !{!"Simple C++ TBAA"}
67 !6 = !{!7, !3, i64 0}
68 !7 = !{!"_ZTS1A", !3, i64 0}