[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / polly / test / CodeGen / dead_invariant_load_instruction_referenced_by_parameter_1.ll
blob991e3c83eef12e568c95771e4d2e46cd5b087d75
1 ; RUN: opt %loadPolly -polly-codegen < %s
3 ; Check we do not crash even though the dead %tmp8 is referenced by a parameter
4 ; and we do not pre-load it (as it is dead).
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 %struct.hoge = type { ptr, i32, i32, i32, ptr, ptr, %struct.barney, %struct.ham, %struct.wombat }
9 %struct.widget = type { i32, i32, i32, i32, ptr }
10 %struct.quux = type { ptr, i32, i32, i32, %struct.hoge.0 }
11 %struct.hoge.0 = type { [2 x i64] }
12 %struct.barney = type { ptr }
13 %struct.ham = type { i32 }
14 %struct.wombat = type { ptr }
15 %struct.foo = type { ptr, ptr, i32, i32, i32, %struct.hoge.2, %struct.blam, %struct.wombat.5, i16, ptr, ptr, i16, ptr, i16, ptr, i16, ptr, i16, ptr, ptr, i16, ptr, ptr }
16 %struct.wibble = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] }
17 %struct.foo.1 = type { ptr, ptr, i32 }
18 %struct.hoge.2 = type { i16, i16 }
19 %struct.blam = type { i16, ptr }
20 %struct.barney.3 = type { i8, %struct.foo.4 }
21 %struct.foo.4 = type { i64 }
22 %struct.wombat.5 = type { i16 }
23 %struct.blam.6 = type <{ %struct.wombat.5, [6 x i8], ptr, ptr, i32, i16, [2 x i8] }>
24 %struct.foo.7 = type { %struct.wombat.5, ptr, ptr, i8, i8, i32, ptr, i16, ptr, i16, ptr, i16, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr }
25 %struct.bar = type { i32, i16, i16, %struct.wibble.8, i16, ptr }
26 %struct.wibble.8 = type { i32 }
27 %struct.barney.9 = type { i16, i16 }
28 %struct.hoge.10 = type { i16, i16, i16, i16, i16 }
29 %struct.bar.11 = type { i64, i64 }
31 @global = external global i32, align 4
32 @global1 = external global i32, align 4
33 @global2 = external global ptr, align 8
34 @global3 = external global ptr, align 8
35 @global4 = external global ptr, align 8
37 ; Function Attrs: uwtable
38 define i32 @foo(ptr %arg) #0 personality ptr @blam {
39 bb:
40   br label %bb3
42 bb3:                                              ; preds = %bb
43   %tmp = load i32, ptr @global, align 4, !tbaa !1
44   %tmp4 = add i32 %tmp, -1
45   %tmp5 = icmp eq i32 0, 0
46   br i1 %tmp5, label %bb12, label %bb6
48 bb6:                                              ; preds = %bb3
49   br label %bb7
51 bb7:                                              ; preds = %bb7, %bb6
52   %tmp8 = load i32, ptr @global, align 4, !tbaa !1
53   %tmp9 = and i32 %tmp8, 3
54   %tmp10 = icmp eq i32 %tmp9, 0
55   br i1 %tmp10, label %bb11, label %bb7
57 bb11:                                             ; preds = %bb7
58   br label %bb12
60 bb12:                                             ; preds = %bb11, %bb3
61   invoke void @zot(ptr nonnull undef, i32 %tmp4, i32 undef, i32 9, i32 0, i32 39, ptr undef, i32 undef, i32 undef, ptr nonnull undef)
62           to label %bb13 unwind label %bb17
64 bb13:                                             ; preds = %bb12
65   br i1 undef, label %bb16, label %bb14
67 bb14:                                             ; preds = %bb13
68   br label %bb19
70 bb15:                                             ; preds = %bb19
71   br label %bb16
73 bb16:                                             ; preds = %bb15, %bb13
74   ret i32 0
76 bb17:                                             ; preds = %bb12
77   %tmp18 = landingpad { ptr, i32 }
78           cleanup
79   resume { ptr, i32 } %tmp18
81 bb19:                                             ; preds = %bb19, %bb14
82   br i1 undef, label %bb15, label %bb19
85 ; Function Attrs: argmemonly nounwind
86 declare void @llvm.lifetime.start(i64, ptr nocapture) #1
88 ; Function Attrs: nounwind readnone
89 declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2
91 ; Function Attrs: nobuiltin
92 declare noalias ptr @eggs(i64) #3
94 ; Function Attrs: nobuiltin
95 declare noalias ptr @bar(i64) #3
97 ; Function Attrs: uwtable
98 declare void @zot(ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr) unnamed_addr #0 align 2
100 declare i32 @blam(...)
102 ; Function Attrs: nobuiltin nounwind
103 declare void @zot5(ptr) #4
105 ; Function Attrs: argmemonly nounwind
106 declare void @llvm.lifetime.end(i64, ptr nocapture) #1
108 ; Function Attrs: uwtable
109 declare i32 @eggs6(ptr) #0
111 ; Function Attrs: nounwind uwtable
112 declare void @eggs7(ptr, i32, i32, i32) unnamed_addr #5 align 2
114 attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
115 attributes #1 = { argmemonly nounwind }
116 attributes #2 = { nounwind readnone }
117 attributes #3 = { nobuiltin "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
118 attributes #4 = { nobuiltin nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
119 attributes #5 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
121 !llvm.ident = !{!0}
123 !0 = !{!"clang version 3.8.0 (trunk 252700) (llvm/trunk 252705)"}
124 !1 = !{!2, !2, i64 0}
125 !2 = !{!"int", !3, i64 0}
126 !3 = !{!"omnipotent char", !4, i64 0}
127 !4 = !{!"Simple C/C++ TBAA"}