121 lines · plain
1; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -fast-isel-abort=1 -code-model=small -verify-machineinstrs < %s | FileCheck %s --check-prefix=SMALL2; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -fast-isel-abort=1 -code-model=large -verify-machineinstrs < %s | FileCheck %s --check-prefix=LARGE3 4define float @frem_f32(float %a, float %b) {5; SMALL-LABEL: frem_f326; SMALL: bl _fmodf7; LARGE-LABEL: frem_f328; LARGE: adrp [[REG:x[0-9]+]], _fmodf@GOTPAGE9; LARGE: ldr [[REG]], [[[REG]], _fmodf@GOTPAGEOFF]10; LARGE-NEXT: blr [[REG]]11 %1 = frem float %a, %b12 ret float %113}14 15define double @frem_f64(double %a, double %b) {16; SMALL-LABEL: frem_f6417; SMALL: bl _fmod18; LARGE-LABEL: frem_f6419; LARGE: adrp [[REG:x[0-9]+]], _fmod@GOTPAGE20; LARGE: ldr [[REG]], [[[REG]], _fmod@GOTPAGEOFF]21; LARGE-NEXT: blr [[REG]]22 %1 = frem double %a, %b23 ret double %124}25 26define float @sin_f32(float %a) {27; SMALL-LABEL: sin_f3228; SMALL: bl _sinf29; LARGE-LABEL: sin_f3230; LARGE: adrp [[REG:x[0-9]+]], _sinf@GOTPAGE31; LARGE: ldr [[REG]], [[[REG]], _sinf@GOTPAGEOFF]32; LARGE-NEXT: blr [[REG]]33 %1 = call float @llvm.sin.f32(float %a)34 ret float %135}36 37define double @sin_f64(double %a) {38; SMALL-LABEL: sin_f6439; SMALL: bl _sin40; LARGE-LABEL: sin_f6441; LARGE: adrp [[REG:x[0-9]+]], _sin@GOTPAGE42; LARGE: ldr [[REG]], [[[REG]], _sin@GOTPAGEOFF]43; LARGE-NEXT: blr [[REG]]44 %1 = call double @llvm.sin.f64(double %a)45 ret double %146}47 48define float @cos_f32(float %a) {49; SMALL-LABEL: cos_f3250; SMALL: bl _cosf51; LARGE-LABEL: cos_f3252; LARGE: adrp [[REG:x[0-9]+]], _cosf@GOTPAGE53; LARGE: ldr [[REG]], [[[REG]], _cosf@GOTPAGEOFF]54; LARGE-NEXT: blr [[REG]]55 %1 = call float @llvm.cos.f32(float %a)56 ret float %157}58 59define double @cos_f64(double %a) {60; SMALL-LABEL: cos_f6461; SMALL: bl _cos62; LARGE-LABEL: cos_f6463; LARGE: adrp [[REG:x[0-9]+]], _cos@GOTPAGE64; LARGE: ldr [[REG]], [[[REG]], _cos@GOTPAGEOFF]65; LARGE-NEXT: blr [[REG]]66 %1 = call double @llvm.cos.f64(double %a)67 ret double %168}69 70define float @tan_f32(float %a) {71; SMALL-LABEL: tan_f3272; SMALL: bl _tanf73; LARGE-LABEL: tan_f3274; LARGE: adrp [[REG:x[0-9]+]], _tanf@GOTPAGE75; LARGE: ldr [[REG]], [[[REG]], _tanf@GOTPAGEOFF]76; LARGE-NEXT: blr [[REG]]77 %1 = call float @llvm.tan.f32(float %a)78 ret float %179}80 81define double @tan_f64(double %a) {82; SMALL-LABEL: tan_f6483; SMALL: bl _tan84; LARGE-LABEL: tan_f6485; LARGE: adrp [[REG:x[0-9]+]], _tan@GOTPAGE86; LARGE: ldr [[REG]], [[[REG]], _tan@GOTPAGEOFF]87; LARGE-NEXT: blr [[REG]]88 %1 = call double @llvm.tan.f64(double %a)89 ret double %190}91 92define float @pow_f32(float %a, float %b) {93; SMALL-LABEL: pow_f3294; SMALL: bl _powf95; LARGE-LABEL: pow_f3296; LARGE: adrp [[REG:x[0-9]+]], _powf@GOTPAGE97; LARGE: ldr [[REG]], [[[REG]], _powf@GOTPAGEOFF]98; LARGE-NEXT: blr [[REG]]99 %1 = call float @llvm.pow.f32(float %a, float %b)100 ret float %1101}102 103define double @pow_f64(double %a, double %b) {104; SMALL-LABEL: pow_f64105; SMALL: bl _pow106; LARGE-LABEL: pow_f64107; LARGE: adrp [[REG:x[0-9]+]], _pow@GOTPAGE108; LARGE: ldr [[REG]], [[[REG]], _pow@GOTPAGEOFF]109; LARGE-NEXT: blr [[REG]]110 %1 = call double @llvm.pow.f64(double %a, double %b)111 ret double %1112}113declare float @llvm.sin.f32(float)114declare double @llvm.sin.f64(double)115declare float @llvm.cos.f32(float)116declare double @llvm.cos.f64(double)117declare float @llvm.tan.f32(float)118declare double @llvm.tan.f64(double)119declare float @llvm.pow.f32(float, float)120declare double @llvm.pow.f64(double, double)121