1 ; RUN: llc < %s -mtriple=arm64-apple-darwin | FileCheck %s
2 ; RUN: llc < %s -mtriple=arm64-apple-darwin -global-isel | FileCheck %s
5 ; CHECK: .quad 0x400921fb54442d18
6 define double @foo() optsize {
8 ; CHECK: adrp x[[REG:[0-9]+]], lCPI0_0@PAGE
9 ; CHECK: ldr d0, [x[[REG]], lCPI0_0@PAGEOFF]
11 ret double 0x400921FB54442D18
15 ; CHECK: .quad 0x0000001fffffffc
16 define double @foo2() optsize {
18 ; CHECK: adrp x[[REG:[0-9]+]], lCPI1_0@PAGE
19 ; CHECK: ldr d0, [x[[REG]], lCPI1_0@PAGEOFF]
21 ret double 0x1FFFFFFFC1
24 define float @bar() optsize {
26 ; CHECK: adrp x[[REG:[0-9]+]], lCPI2_0@PAGE
27 ; CHECK: ldr s0, [x[[REG]], lCPI2_0@PAGEOFF]
29 ret float 0x400921FB60000000
35 define fp128 @baz() optsize {
37 ; CHECK: adrp x[[REG:[0-9]+]], lCPI3_0@PAGE
38 ; CHECK: ldr q0, [x[[REG]], lCPI3_0@PAGEOFF]
40 ret fp128 0xL00000000000000000000000000000000
44 ; CHECK: .quad 0x0000001fffffffd
45 define double @foo2_pgso() !prof !14 {
47 ; CHECK: adrp x[[REG:[0-9]+]], lCPI4_0@PAGE
48 ; CHECK: ldr d0, [x[[REG]], lCPI4_0@PAGEOFF]
50 ret double 0x1FFFFFFFd1
53 define float @bar_pgso() !prof !14 {
55 ; CHECK: adrp x[[REG:[0-9]+]], lCPI5_0@PAGE
56 ; CHECK: ldr s0, [x[[REG]], lCPI5_0@PAGEOFF]
58 ret float 0x400921FB80000000
61 !llvm.module.flags = !{!0}
62 !0 = !{i32 1, !"ProfileSummary", !1}
63 !1 = !{!2, !3, !4, !5, !6, !7, !8, !9}
64 !2 = !{!"ProfileFormat", !"InstrProf"}
65 !3 = !{!"TotalCount", i64 10000}
66 !4 = !{!"MaxCount", i64 10}
67 !5 = !{!"MaxInternalCount", i64 1}
68 !6 = !{!"MaxFunctionCount", i64 1000}
69 !7 = !{!"NumCounts", i64 3}
70 !8 = !{!"NumFunctions", i64 3}
71 !9 = !{!"DetailedSummary", !10}
72 !10 = !{!11, !12, !13}
73 !11 = !{i32 10000, i64 100, i32 1}
74 !12 = !{i32 999000, i64 100, i32 1}
75 !13 = !{i32 999999, i64 1, i32 2}
76 !14 = !{!"function_entry_count", i64 0}