1 ; RUN: llc -mattr=mul < %s -march=avr | FileCheck %s
3 declare float @dsin(float)
4 declare float @dcos(float)
5 declare float @dasin(float)
7 ; Test prologue and epilogue insertion
8 define float @f3(float %days) {
15 ; CHECK-NEXT: in r29, 62
16 ; CHECK-NEXT: sbiw r28, [[SIZE:[0-9]+]]
17 ; CHECK-NEXT: in r0, 63
19 ; CHECK-NEXT: out 62, r29
20 ; CHECK-NEXT: out 63, r0
21 ; CHECK-NEXT: out 61, r28
23 ; CHECK: adiw r28, [[SIZE]]
24 ; CHECK-NEXT: in r0, 63
26 ; CHECK-NEXT: out 62, r29
27 ; CHECK-NEXT: out 63, r0
28 ; CHECK-NEXT: out 61, r28
31 %mul = fmul float %days, 0x3FEF8A6C60000000
32 %add = fadd float %mul, 0x40718776A0000000
33 %mul1 = fmul float %days, 0x3FEF8A09A0000000
34 %add2 = fadd float %mul1, 0x4076587740000000
35 %mul3 = fmul float %days, 0x3E81B35CC0000000
36 %sub = fsub float 0x3FFEA235C0000000, %mul3
37 %call = call float @dsin(float %add2)
38 %mul4 = fmul float %sub, %call
39 %mul5 = fmul float %days, 0x3E27C04CA0000000
40 %sub6 = fsub float 0x3F94790B80000000, %mul5
41 %mul7 = fmul float %add2, 2.000000e+00
42 %call8 = call float @dsin(float %mul7)
43 %mul9 = fmul float %sub6, %call8
44 %add10 = fadd float %mul4, %mul9
45 %add11 = fadd float %add, %add10
46 %mul12 = fmul float %days, 0x3E13C5B640000000
47 %sub13 = fsub float 0x3F911C1180000000, %mul12
48 %mul14 = fmul float %add, 2.000000e+00
49 %call15 = call float @dsin(float %mul14)
50 %mul16 = fmul float %call15, 0x3FF1F736C0000000
51 %mul17 = fmul float %sub13, 2.000000e+00
52 %mul19 = fmul float %mul17, %call
53 %sub20 = fsub float %mul16, %mul19
54 %mul21 = fmul float %sub13, 4.000000e+00
55 %mul22 = fmul float %mul21, 0x3FF1F736C0000000
56 %mul24 = fmul float %mul22, %call
57 %call26 = call float @dcos(float %mul14)
58 %mul27 = fmul float %mul24, %call26
59 %add28 = fadd float %sub20, %mul27
60 %call29 = call float @dsin(float %add11)
61 %mul30 = fmul float %call29, 0x3FF0AB6960000000
62 %call31 = call float @dasin(float %mul30)
63 %add32 = fadd float %call31, %add28