1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
6 @x = external hidden local_unnamed_addr global i32*, align 8
8 define void @select_add_low_without_offset() { ret void }
9 define void @select_add_low_with_offset() { ret void }
10 define void @select_add_low_without_adrp() { ret void }
14 name: select_add_low_without_offset
17 tracksRegLiveness: true
21 ; CHECK-LABEL: name: select_add_low_without_offset
23 ; CHECK: %add_low:gpr64common = MOVaddr target-flags(aarch64-page) @x, target-flags(aarch64-pageoff, aarch64-nc) @x
24 ; CHECK: $x0 = COPY %add_low
25 ; CHECK: RET_ReallyLR implicit $x0
26 %copy:gpr(p0) = COPY $x0
27 %adrp:gpr64(p0) = ADRP target-flags(aarch64-page) @x
28 %add_low:gpr(p0) = G_ADD_LOW %adrp(p0), target-flags(aarch64-pageoff, aarch64-nc) @x
30 RET_ReallyLR implicit $x0
34 name: select_add_low_with_offset
37 tracksRegLiveness: true
41 ; CHECK-LABEL: name: select_add_low_with_offset
43 ; CHECK: %add_low:gpr64common = MOVaddr target-flags(aarch64-page) @x + 1, target-flags(aarch64-pageoff, aarch64-nc) @x + 1
44 ; CHECK: $x0 = COPY %add_low
45 ; CHECK: RET_ReallyLR implicit $x0
46 %copy:gpr(p0) = COPY $x0
47 %adrp:gpr64(p0) = ADRP target-flags(aarch64-page) @x + 1
48 %add_low:gpr(p0) = G_ADD_LOW %adrp(p0), target-flags(aarch64-pageoff, aarch64-nc) @x + 1
50 RET_ReallyLR implicit $x0
54 name: select_add_low_without_adrp
57 tracksRegLiveness: true
61 ; CHECK-LABEL: name: select_add_low_without_adrp
63 ; CHECK: %ptr:gpr64sp = COPY $x0
64 ; CHECK: %add_low:gpr64sp = ADDXri %ptr, target-flags(aarch64-pageoff, aarch64-nc) @x, 0
65 ; CHECK: $x0 = COPY %add_low
66 ; CHECK: RET_ReallyLR implicit $x0
67 %ptr:gpr(p0) = COPY $x0
68 %add_low:gpr(p0) = G_ADD_LOW %ptr(p0), target-flags(aarch64-pageoff, aarch64-nc) @x
70 RET_ReallyLR implicit $x0