36 lines · plain
1; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O0 | FileCheck --check-prefix=NO-MERGE %s2; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O1 | FileCheck --check-prefix=NO-MERGE %s3; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O2 | FileCheck --check-prefix=NO-MERGE %s4; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O3 | FileCheck %s5; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O3 -global-merge-max-offset=0 | FileCheck %s --check-prefix=NO-MERGE6; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O0 -global-merge-on-external=true | FileCheck --check-prefix=NO-MERGE %s7 8; RUN: llc < %s -mtriple=aarch64-apple-ios -O0 | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE9; RUN: llc < %s -mtriple=aarch64-apple-ios -O1 | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE10; RUN: llc < %s -mtriple=aarch64-apple-ios -O2 | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE11; RUN: llc < %s -mtriple=aarch64-apple-ios -O3 | FileCheck %s --check-prefix=CHECK-APPLE-IOS12; RUN: llc < %s -mtriple=aarch64-apple-ios -O0 -global-merge-on-external=true | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE13 14@m = internal global i32 0, align 415@n = internal global i32 0, align 416 17define void @f1(i32 %a1, i32 %a2) {18; CHECK-LABEL: f1:19; CHECK: adrp x{{[0-9]+}}, .L_MergedGlobals20; CHECK-NOT: adrp21 22; CHECK-APPLE-IOS-LABEL: f1:23; CHECK-APPLE-IOS: adrp x{{[0-9]+}}, __MergedGlobals24; CHECK-APPLE-IOS-NOT: adrp25 store i32 %a1, ptr @m, align 426 store i32 %a2, ptr @n, align 427 ret void28}29 30; CHECK: .local .L_MergedGlobals31; CHECK: .comm .L_MergedGlobals,8,432; NO-MERGE-NOT: .local _MergedGlobals33 34; CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,235; CHECK-APPLE-IOS-NO-MERGE-NOT: .zerofill __DATA,__bss,__MergedGlobals,8,236