brintos

brintos / llvm-project-archived public Read only

0
0
Text · 634 B · 72ae5d2 Raw
24 lines · plain
1; RUN: llc < %s -mtriple=avr | FileCheck %s2 3; Checks that `sin` and `cos` nodes are expanded into calls to4; the `sin` and `cos` runtime library functions.5; On AVR, the only floats supported are 32-bits, and so the6; function names have no `f` or `d` suffix.7 8declare float @llvm.sin.f32(float %x)9declare float @llvm.cos.f32(float %x)10 11define float @do_sin(float %a) {12; CHECK-LABEL: do_sin:13; CHECK: {{sin$}}14    %result = call float @llvm.sin.f32(float %a)15    ret float %result16}17 18; CHECK-LABEL: do_cos:19; CHECK: {{cos$}}20define float @do_cos(float %a) {21    %result = call float @llvm.cos.f32(float %a)22    ret float %result23}24