1 ; RUN: llc -O0 -fast-isel -fast-isel-abort=1 -verify-machineinstrs -mtriple=arm64-apple-darwin < %s | FileCheck %s
2 ; RUN: llc -O0 -global-isel -verify-machineinstrs -mtriple=arm64-apple-darwin %s -o - | FileCheck %s --check-prefix=GISEL
5 ; Materialize using fmov
6 define float @fmov_float1() {
7 ; CHECK-LABEL: fmov_float1
8 ; CHECK: fmov s0, #1.25000000
9 ; GISEL-LABEL: fmov_float1
10 ; GISEL: fmov s0, #1.25000000
11 ret float 1.250000e+00
14 define float @fmov_float2() {
15 ; CHECK-LABEL: fmov_float2
17 ; GISEL-LABEL: fmov_float2
18 ; GISEL: movi d0, #0000000000000000
22 define double @fmov_double1() {
23 ; CHECK-LABEL: fmov_double1
24 ; CHECK: fmov d0, #1.25000000
25 ; GISEL-LABEL: fmov_double1
26 ; GISEL: fmov d0, #1.25000000
27 ret double 1.250000e+00
30 define double @fmov_double2() {
31 ; CHECK-LABEL: fmov_double2
33 ; GISEL-LABEL: fmov_double2
34 ; GISEL: movi d0, #0000000000000000
38 ; Materialize from constant pool
39 define float @cp_float() {
40 ; CHECK-LABEL: cp_float
41 ; CHECK: adrp [[REG:x[0-9]+]], {{lCPI[0-9]+_0}}@PAGE
42 ; CHECK-NEXT: ldr s0, [[[REG]], {{lCPI[0-9]+_0}}@PAGEOFF]
43 ret float 0x400921FB60000000
46 define double @cp_double() {
47 ; CHECK-LABEL: cp_double
48 ; CHECK: adrp [[REG:x[0-9]+]], {{lCPI[0-9]+_0}}@PAGE
49 ; CHECK-NEXT: ldr d0, [[[REG]], {{lCPI[0-9]+_0}}@PAGEOFF]
50 ret double 0x400921FB54442D18