Part of PR19455.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206611
91177308-0d34-0410-b5e6-
96231b3b80d8
// Relax conditional branch instructions if they're otherwise out of
// range of their destination.
addPass(createARM64BranchRelaxation());
- if (TM->getOptLevel() != CodeGenOpt::None && EnableCollectLOH)
+ if (TM->getOptLevel() != CodeGenOpt::None && EnableCollectLOH &&
+ TM->getSubtarget<ARM64Subtarget>().isTargetMachO())
addPass(createARM64CollectLOHPass());
return true;
}
; RUN: llc -mtriple=arm64-apple-ios -O2 -arm64-collect-loh -arm64-collect-loh-bb-only=false < %s -o - | FileCheck %s
+; RUN: llc -mtriple=arm64-linux-gnu -O2 -arm64-collect-loh -arm64-collect-loh-bb-only=false < %s -o - | FileCheck %s --check-prefix=CHECK-ELF
+
+; CHECK-ELF-NOT: .loh
+; CHECK-ELF-NOT: AdrpAdrp
+; CHECK-ELF-NOT: AdrpAdd
+; CHECK-ELF-NOT: AdrpLdrGot
@a = internal unnamed_addr global i32 0, align 4
@b = external global i32