1*5102028fSHiroshi Inoue; RUN: llc -verify-machineinstrs -O2 -mtriple=powerpc64-unknown-linux-gnu -fast-isel=false < %s | FileCheck %s
222162470SBill Schmidt
322162470SBill Schmidt; This verifies that single-precision floating point values that can't
422162470SBill Schmidt; be passed in registers are stored in the rightmost word of the parameter
522162470SBill Schmidt; save area slot.  There are 13 architected floating-point registers, so
622162470SBill Schmidt; the 14th is passed in storage.  The address of the 14th argument is
722162470SBill Schmidt; 48 (fixed size of the linkage area) + 13 * 8 (first 13 args) + 4
822162470SBill Schmidt; (offset to second word) = 156.
922162470SBill Schmidt
1022162470SBill Schmidtdefine float @bar(float %a, float %b, float %c, float %d, float %e, float %f, float %g, float %h, float %i, float %j, float %k, float %l, float %m, float %n) nounwind {
1122162470SBill Schmidtentry:
1222162470SBill Schmidt  %a.addr = alloca float, align 4
1322162470SBill Schmidt  %b.addr = alloca float, align 4
1422162470SBill Schmidt  %c.addr = alloca float, align 4
1522162470SBill Schmidt  %d.addr = alloca float, align 4
1622162470SBill Schmidt  %e.addr = alloca float, align 4
1722162470SBill Schmidt  %f.addr = alloca float, align 4
1822162470SBill Schmidt  %g.addr = alloca float, align 4
1922162470SBill Schmidt  %h.addr = alloca float, align 4
2022162470SBill Schmidt  %i.addr = alloca float, align 4
2122162470SBill Schmidt  %j.addr = alloca float, align 4
2222162470SBill Schmidt  %k.addr = alloca float, align 4
2322162470SBill Schmidt  %l.addr = alloca float, align 4
2422162470SBill Schmidt  %m.addr = alloca float, align 4
2522162470SBill Schmidt  %n.addr = alloca float, align 4
2622162470SBill Schmidt  store float %a, float* %a.addr, align 4
2722162470SBill Schmidt  store float %b, float* %b.addr, align 4
2822162470SBill Schmidt  store float %c, float* %c.addr, align 4
2922162470SBill Schmidt  store float %d, float* %d.addr, align 4
3022162470SBill Schmidt  store float %e, float* %e.addr, align 4
3122162470SBill Schmidt  store float %f, float* %f.addr, align 4
3222162470SBill Schmidt  store float %g, float* %g.addr, align 4
3322162470SBill Schmidt  store float %h, float* %h.addr, align 4
3422162470SBill Schmidt  store float %i, float* %i.addr, align 4
3522162470SBill Schmidt  store float %j, float* %j.addr, align 4
3622162470SBill Schmidt  store float %k, float* %k.addr, align 4
3722162470SBill Schmidt  store float %l, float* %l.addr, align 4
3822162470SBill Schmidt  store float %m, float* %m.addr, align 4
3922162470SBill Schmidt  store float %n, float* %n.addr, align 4
40a79ac14fSDavid Blaikie  %0 = load float, float* %n.addr, align 4
4122162470SBill Schmidt  ret float %0
4222162470SBill Schmidt}
4322162470SBill Schmidt
4422162470SBill Schmidt; CHECK: lfs {{[0-9]+}}, 156(1)
4522162470SBill Schmidt
4622162470SBill Schmidtdefine float @foo() nounwind {
4722162470SBill Schmidtentry:
4822162470SBill Schmidt  %a = alloca float, align 4
4922162470SBill Schmidt  %b = alloca float, align 4
5022162470SBill Schmidt  %c = alloca float, align 4
5122162470SBill Schmidt  %d = alloca float, align 4
5222162470SBill Schmidt  %e = alloca float, align 4
5322162470SBill Schmidt  %f = alloca float, align 4
5422162470SBill Schmidt  %g = alloca float, align 4
5522162470SBill Schmidt  %h = alloca float, align 4
5622162470SBill Schmidt  %i = alloca float, align 4
5722162470SBill Schmidt  %j = alloca float, align 4
5822162470SBill Schmidt  %k = alloca float, align 4
5922162470SBill Schmidt  %l = alloca float, align 4
6022162470SBill Schmidt  %m = alloca float, align 4
6122162470SBill Schmidt  %n = alloca float, align 4
6222162470SBill Schmidt  store float 1.000000e+00, float* %a, align 4
6322162470SBill Schmidt  store float 2.000000e+00, float* %b, align 4
6422162470SBill Schmidt  store float 3.000000e+00, float* %c, align 4
6522162470SBill Schmidt  store float 4.000000e+00, float* %d, align 4
6622162470SBill Schmidt  store float 5.000000e+00, float* %e, align 4
6722162470SBill Schmidt  store float 6.000000e+00, float* %f, align 4
6822162470SBill Schmidt  store float 7.000000e+00, float* %g, align 4
6922162470SBill Schmidt  store float 8.000000e+00, float* %h, align 4
7022162470SBill Schmidt  store float 9.000000e+00, float* %i, align 4
7122162470SBill Schmidt  store float 1.000000e+01, float* %j, align 4
7222162470SBill Schmidt  store float 1.100000e+01, float* %k, align 4
7322162470SBill Schmidt  store float 1.200000e+01, float* %l, align 4
7422162470SBill Schmidt  store float 1.300000e+01, float* %m, align 4
7522162470SBill Schmidt  store float 1.400000e+01, float* %n, align 4
76a79ac14fSDavid Blaikie  %0 = load float, float* %a, align 4
77a79ac14fSDavid Blaikie  %1 = load float, float* %b, align 4
78a79ac14fSDavid Blaikie  %2 = load float, float* %c, align 4
79a79ac14fSDavid Blaikie  %3 = load float, float* %d, align 4
80a79ac14fSDavid Blaikie  %4 = load float, float* %e, align 4
81a79ac14fSDavid Blaikie  %5 = load float, float* %f, align 4
82a79ac14fSDavid Blaikie  %6 = load float, float* %g, align 4
83a79ac14fSDavid Blaikie  %7 = load float, float* %h, align 4
84a79ac14fSDavid Blaikie  %8 = load float, float* %i, align 4
85a79ac14fSDavid Blaikie  %9 = load float, float* %j, align 4
86a79ac14fSDavid Blaikie  %10 = load float, float* %k, align 4
87a79ac14fSDavid Blaikie  %11 = load float, float* %l, align 4
88a79ac14fSDavid Blaikie  %12 = load float, float* %m, align 4
89a79ac14fSDavid Blaikie  %13 = load float, float* %n, align 4
9022162470SBill Schmidt  %call = call float @bar(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8, float %9, float %10, float %11, float %12, float %13)
9122162470SBill Schmidt  ret float %call
9222162470SBill Schmidt}
9322162470SBill Schmidt
9422162470SBill Schmidt; Note that stw is used instead of stfs because the value is a simple
9522162470SBill Schmidt; constant that can be created with a load-immediate in a GPR.
9622162470SBill Schmidt; CHECK: stw {{[0-9]+}}, 156(1)
9722162470SBill Schmidt
98