brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · a6acdd5 Raw
90 lines · plain
1; RUN: llc %s -O0 -o - | FileCheck -check-prefix=NO-MERGE %s2; RUN: llc %s -O0 -o - -arm-global-merge=false | FileCheck -check-prefix=NO-MERGE %s3; RUN: llc %s -O0 -o - -arm-global-merge=true | FileCheck -check-prefix=MERGE %s4; RUN: llc %s -O1 -o - | FileCheck -check-prefix=NO-MERGE %s5; RUN: llc %s -O1 -o - -arm-global-merge=false | FileCheck -check-prefix=NO-MERGE %s6; RUN: llc %s -O1 -o - -arm-global-merge=true | FileCheck -check-prefix=MERGE %s7; RUN: llc %s -O3 -o - | FileCheck -check-prefix=MERGE %s8; RUN: llc %s -O3 -o - -arm-global-merge=false | FileCheck -check-prefix=NO-MERGE %s9; RUN: llc %s -O3 -o - -arm-global-merge=true | FileCheck -check-prefix=MERGE %s10; RUN: llc %s -O3 -o - -arm-global-merge=true -global-merge-max-offset=0 | FileCheck -check-prefix=NO-MERGE %s11 12; MERGE-NOT: .zerofill __DATA,__bss,_bar,20,213; MERGE-NOT: .zerofill __DATA,__bss,_baz,20,214; MERGE-NOT: .zerofill __DATA,__bss,_foo,20,215; MERGE: .zerofill __DATA,__bss,__MergedGlobals,60,216; MERGE-NOT: .zerofill __DATA,__bss,_bar,20,217; MERGE-NOT: .zerofill __DATA,__bss,_baz,20,218; MERGE-NOT: .zerofill __DATA,__bss,_foo,20,219 20; NO-MERGE-NOT: .zerofill __DATA,__bss,__MergedGlobals,60,221; NO-MERGE: .zerofill __DATA,__bss,_bar,20,222; NO-MERGE: .zerofill __DATA,__bss,_baz,20,223; NO-MERGE: .zerofill __DATA,__bss,_foo,20,224; NO-MERGE-NOT: .zerofill __DATA,__bss,__MergedGlobals,60,225 26target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"27target triple = "thumbv7-apple-ios3.0.0"28 29@bar = internal global [5 x i32] zeroinitializer, align 430@baz = internal global [5 x i32] zeroinitializer, align 431@foo = internal global [5 x i32] zeroinitializer, align 432 33; Function Attrs: nounwind ssp34define internal void @initialize() #0 {35  %1 = tail call i32 @calc() #336  store i32 %1, ptr @bar, align 4, !tbaa !137  %2 = tail call i32 @calc() #338  store i32 %2, ptr @baz, align 4, !tbaa !139  %3 = tail call i32 @calc() #340  store i32 %3, ptr getelementptr inbounds ([5 x i32], ptr @bar, i32 0, i32 1), align 4, !tbaa !141  %4 = tail call i32 @calc() #342  store i32 %4, ptr getelementptr inbounds ([5 x i32], ptr @baz, i32 0, i32 1), align 4, !tbaa !143  %5 = tail call i32 @calc() #344  store i32 %5, ptr getelementptr inbounds ([5 x i32], ptr @bar, i32 0, i32 2), align 4, !tbaa !145  %6 = tail call i32 @calc() #346  store i32 %6, ptr getelementptr inbounds ([5 x i32], ptr @baz, i32 0, i32 2), align 4, !tbaa !147  %7 = tail call i32 @calc() #348  store i32 %7, ptr getelementptr inbounds ([5 x i32], ptr @bar, i32 0, i32 3), align 4, !tbaa !149  %8 = tail call i32 @calc() #350  store i32 %8, ptr getelementptr inbounds ([5 x i32], ptr @baz, i32 0, i32 3), align 4, !tbaa !151  %9 = tail call i32 @calc() #352  store i32 %9, ptr getelementptr inbounds ([5 x i32], ptr @bar, i32 0, i32 4), align 4, !tbaa !153  %10 = tail call i32 @calc() #354  store i32 %10, ptr getelementptr inbounds ([5 x i32], ptr @baz, i32 0, i32 4), align 4, !tbaa !155  ret void56}57 58declare i32 @calc(...) #159 60; Function Attrs: nounwind ssp61define internal void @calculate() #0 {62  %1 = load <4 x i32>, ptr @bar, align 463  %2 = load <4 x i32>, ptr @baz, align 464  %3 = mul <4 x i32> %2, %165  store <4 x i32> %3, ptr @foo, align 466  %4 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @bar, i32 0, i32 4), align 4, !tbaa !167  %5 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @baz, i32 0, i32 4), align 4, !tbaa !168  %6 = mul nsw i32 %5, %469  store i32 %6, ptr getelementptr inbounds ([5 x i32], ptr @foo, i32 0, i32 4), align 4, !tbaa !170  ret void71}72 73; Function Attrs: nounwind readnone ssp74define internal ptr @returnFoo() #2 {75  ret ptr @foo76}77 78attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }79attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }80attributes #2 = { nounwind readnone ssp "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }81attributes #3 = { nounwind }82 83!llvm.ident = !{!0}84 85!0 = !{!"LLVM version 3.4 "}86!1 = !{!2, !2, i64 0}87!2 = !{!"int", !3, i64 0}88!3 = !{!"omnipotent char", !4, i64 0}89!4 = !{!"Simple C/C++ TBAA"}90