31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -global-isel -o - %s | FileCheck %s3target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"4target triple = "arm64-apple-macosx14.0.0"5 6%struct.S = type { ptr }7 8@str = global %struct.S zeroinitializer, align 89 10; Checks that on Darwin we don't fold the global into the prfm instruction11; since ld64 doesn't support it.12 13define void @test() #0 {14; CHECK-LABEL: test:15; CHECK: ; %bb.0: ; %entry16; CHECK-NEXT: Lloh0:17; CHECK-NEXT: adrp x8, _str@PAGE18; CHECK-NEXT: Lloh1:19; CHECK-NEXT: add x8, x8, _str@PAGEOFF20; CHECK-NEXT: prfm pldl1strm, [x8]21; CHECK-NEXT: ret22; CHECK-NEXT: .loh AdrpAdd Lloh0, Lloh123entry:24 call void @llvm.prefetch.p0(ptr @str, i32 0, i32 0, i32 1)25 ret void26}27 28; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)29declare void @llvm.prefetch.p0(ptr nocapture readonly, i32 immarg, i32 immarg, i32 immarg) #130 31