[PowerPC] Eliminate compares - add i32 sext/zext handling for SETULT/SETUGT
[llvm-core.git] / test / Transforms / CodeExtractor / live_shrink_hoist.ll
blobd1b310f017694675d9a002796e595d0dc358087d
1 ; RUN: opt -S -partial-inliner -max-num-inline-blocks=2 -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   %tmp1 = bitcast %class.A* %tmp to i8*
13   call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp1) 
14   %tmp2 = load i32, i32* @cond, align 4, !tbaa !2
15   %tmp3 = icmp eq i32 %tmp2, 0
16   br i1 %tmp3, label %bb4, label %bb9
18 bb4:                                              ; preds = %bb
19   call void @_ZN1A7memfuncEv(%class.A* nonnull %tmp)
20   %tmp5 = getelementptr inbounds %class.A, %class.A* %tmp, i64 0, i32 0
21   %tmp6 = load i32, i32* %tmp5, align 4, !tbaa !6
22   %tmp7 = icmp sgt i32 %tmp6, 0
23   br i1 %tmp7, label %bb9, label %bb8
25 bb8:                                              ; preds = %bb4
26   call void @_ZN1A7memfuncEv(%class.A* nonnull %tmp)
27   br label %bb9
29 bb9:                                              ; preds = %bb8, %bb4, %bb
30   call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp1) 
31   ret void
34 ; Function Attrs: argmemonly nounwind
35 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) 
37 declare void @_ZN1A7memfuncEv(%class.A*) local_unnamed_addr 
39 ; Function Attrs: argmemonly nounwind
40 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) 
42 ; Function Attrs: uwtable
43 define void @_Z3goov() local_unnamed_addr  {
44 bb:
45   tail call void @_Z3foov()
46   ret void
49 ; CHECK-LABEL: define internal void @_Z3foov.1_
50 ; CHECK: bb9:
51 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp1)
52 ; CHECK:  br label %.exitStub
56 !llvm.module.flags = !{!0}
57 !llvm.ident = !{!1}
59 !0 = !{i32 1, !"wchar_size", i32 4}
60 !1 = !{!"clang version 5.0.0 (trunk 304489)"}
61 !2 = !{!3, !3, i64 0}
62 !3 = !{!"int", !4, i64 0}
63 !4 = !{!"omnipotent char", !5, i64 0}
64 !5 = !{!"Simple C++ TBAA"}
65 !6 = !{!7, !3, i64 0}
66 !7 = !{!"_ZTS1A", !3, i64 0}