1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
4 target triple = "armv7-none--gnueabihf"
6 %struct.s = type { float, float }
7 %union.t = type { [4 x float] }
10 ; struct s { float a; float b; };
11 ; float foo(float a, double b, struct s c) { return c.a; }
12 ; Argument allocation:
18 define float @test1(float %a, double %b, %struct.s %c) {
21 ; CHECK: vmov.f32 s0, s4
22 ; CHECK-NOT: vmov.f32 s0, s1
24 %result = extractvalue %struct.s %c, 0
29 ; union t { float a[4] };
30 ; float foo(float a, double b, union s c) { return c.a[0]; }
31 ; Argument allocation:
35 define float @test2(float %a, double %b, %union.t %c) #0 {
38 ; CHECK: vmov.f32 s0, s4
39 ; CHECK-NOT: vmov.f32 s0, s1
41 %result = extractvalue %union.t %c, 0, 0
46 ; struct s { float a; float b; };
47 ; float foo(float a, double b, struct s c, float d) { return d; }
48 ; Argument allocation:
54 define float @test3(float %a, double %b, %struct.s %c, float %d) {
57 ; CHECK: vmov.f32 s0, s1
58 ; CHECK-NOT: vmov.f32 s0, s5
64 ; struct s { float a; float b; };
65 ; float foo(struct s a, struct s b) { return b.b; }
66 ; Argument allocation:
70 define float @test4(%struct.s %a, %struct.s %b) {
73 ; CHECK: vmov.f32 s0, s3
75 %result = extractvalue %struct.s %b, 1
80 ; struct s { float a; float b; };
81 ; float foo(struct s a, float b, struct s c) { return c.a; }
82 ; Argument allocation:
87 define float @test5(%struct.s %a, float %b, %struct.s %c) {
90 ; CHECK: vmov.f32 s0, s3
92 %result = extractvalue %struct.s %c, 0