1; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-none-linux-gnu -mcpu=cyclone | FileCheck %s 2; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-none-linux-gnu -code-model=large -mcpu=cyclone | FileCheck --check-prefix=CHECK-LARGE %s 3; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s 4; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -code-model=large -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP-LARGE %s 5 6@varfloat = global float 0.0 7@vardouble = global double 0.0 8 9define void @floating_lits() { 10; CHECK-LABEL: floating_lits: 11 12 %floatval = load float, float* @varfloat 13 %newfloat = fadd float %floatval, 128.0 14; CHECK: adrp x[[LITBASE:[0-9]+]], [[CURLIT:.LCPI[0-9]+_[0-9]+]] 15; CHECK: ldr [[LIT128:s[0-9]+]], [x[[LITBASE]], {{#?}}:lo12:[[CURLIT]]] 16; CHECK-NOFP-NOT: ldr {{s[0-9]+}}, 17 18; CHECK-LARGE: movz x[[LITADDR:[0-9]+]], #:abs_g3:[[CURLIT:.LCPI[0-9]+_[0-9]+]] 19; CHECK-LARGE: movk x[[LITADDR]], #:abs_g2_nc:[[CURLIT]] 20; CHECK-LARGE: movk x[[LITADDR]], #:abs_g1_nc:[[CURLIT]] 21; CHECK-LARGE: movk x[[LITADDR]], #:abs_g0_nc:[[CURLIT]] 22; CHECK-LARGE: ldr {{s[0-9]+}}, [x[[LITADDR]]] 23; CHECK-LARGE: fadd 24; CHECK-NOFP-LARGE-NOT: ldr {{s[0-9]+}}, 25; CHECK-NOFP-LARGE-NOT: fadd 26 27 store float %newfloat, float* @varfloat 28 29 %doubleval = load double, double* @vardouble 30 %newdouble = fadd double %doubleval, 129.0 31; CHECK: adrp x[[LITBASE:[0-9]+]], [[CURLIT:.LCPI[0-9]+_[0-9]+]] 32; CHECK: ldr [[LIT129:d[0-9]+]], [x[[LITBASE]], {{#?}}:lo12:[[CURLIT]]] 33; CHECK-NOFP-NOT: ldr {{d[0-9]+}}, 34; CHECK-NOFP-NOT: fadd 35 36; CHECK-LARGE: movz x[[LITADDR:[0-9]+]], #:abs_g3:[[CURLIT:.LCPI[0-9]+_[0-9]+]] 37; CHECK-LARGE: movk x[[LITADDR]], #:abs_g2_nc:[[CURLIT]] 38; CHECK-LARGE: movk x[[LITADDR]], #:abs_g1_nc:[[CURLIT]] 39; CHECK-LARGE: movk x[[LITADDR]], #:abs_g0_nc:[[CURLIT]] 40; CHECK-LARGE: ldr {{d[0-9]+}}, [x[[LITADDR]]] 41; CHECK-NOFP-LARGE-NOT: ldr {{d[0-9]+}}, 42 43 store double %newdouble, double* @vardouble 44 45 ret void 46} 47