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