1 ; RUN: llc -O1 -mattr=+splat-vfp-neon -mtriple=armv7-linux-gnueabi -verify-machineinstrs -disable-a15-sd-optimization < %s | FileCheck -check-prefixes=CHECK,CHECK-DISABLED %s
2 ; RUN: llc -O1 -mattr=-splat-vfp-neon -mtriple=armv7-linux-gnueabi -verify-machineinstrs < %s | FileCheck -check-prefixes=CHECK,CHECK-DISABLED %s
3 ; RUN: llc -O1 -mattr=+splat-vfp-neon -mtriple=armv7-linux-gnueabi -verify-machineinstrs < %s | FileCheck -check-prefixes=CHECK,CHECK-ENABLED %s
6 define <2 x float> @t1(float %f) {
7 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d0[0]
8 ; CHECK-DISABLED-NOT: vdup.32 d{{[0-9]*}}, d0[0]
9 %i1 = insertelement <2 x float> undef, float %f, i32 1
10 %i2 = fadd <2 x float> %i1, %i1
15 define <4 x float> @t2(float %g, float %f) {
16 ; CHECK-ENABLED: vdup.32 q{{[0-9]*}}, d0[0]
17 ; CHECK-DISABLED-NOT: vdup.32 d{{[0-9]*}}, d0[0]
18 %i1 = insertelement <4 x float> undef, float %f, i32 1
19 %i2 = fadd <4 x float> %i1, %i1
24 define arm_aapcs_vfpcc <2 x float> @t3(float %f) {
25 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d0[0]
26 ; CHECK-DISABLED-NOT: vdup.32 d{{[0-9]*}}, d0[0]
27 %i1 = insertelement <2 x float> undef, float %f, i32 1
28 %i2 = fadd <2 x float> %i1, %i1
33 define <2 x float> @t4(float %f) {
34 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d0[0]
35 ; CHECK-DISABLED-NOT: vdup
36 %i1 = insertelement <2 x float> undef, float %f, i32 1
39 ; Block %b has an S-reg as live-in.
41 %i2 = fadd <2 x float> %i1, %i1
46 define arm_aapcs_vfpcc <4 x float> @t5(<4 x float> %q, float %f) {
47 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d{{[0-9]*}}[0]
48 ; CHECK-ENABLED: vadd.f32
49 ; CHECK-ENABLED-NEXT: bx lr
50 ; CHECK-DISABLED-NOT: vdup
51 %i1 = insertelement <4 x float> %q, float %f, i32 1
52 %i2 = fadd <4 x float> %i1, %i1
56 ; Test that DPair can be successfully passed as QPR.
57 ; CHECK-LABEL: test_DPair1:
58 define void @test_DPair1(i32 %vsout, i8* nocapture %out, float %x, float %y) {
60 %0 = insertelement <4 x float> undef, float %x, i32 1
61 %1 = insertelement <4 x float> %0, float %y, i32 0
62 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d{{[0-9]*}}[0]
63 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d{{[0-9]*}}[1]
64 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d{{[0-9]*}}[0]
65 ; CHECK-ENABLED: vdup.32 d{{[0-9]*}}, d{{[0-9]*}}[1]
66 ; CHECK-DISABLED-NOT: vdup
67 switch i32 %vsout, label %sw.epilog [
72 sw.bb: ; preds = %entry
73 %2 = insertelement <4 x float> %1, float 0.000000e+00, i32 0
76 sw.bb6: ; preds = %sw.bb, %entry
77 %sum.0 = phi <4 x float> [ %1, %entry ], [ %2, %sw.bb ]
78 %3 = extractelement <4 x float> %sum.0, i32 0
79 %conv = fptoui float %3 to i8
80 store i8 %conv, i8* %out, align 1
83 sw.epilog: ; preds = %entry
87 ; CHECK-LABEL: test_DPair2:
88 define void @test_DPair2(i32 %vsout, i8* nocapture %out, float %x) {
90 %0 = insertelement <4 x float> undef, float %x, i32 0
91 ; CHECK-ENABLED: vdup.32 q{{[0-9]*}}, d{{[0-9]*}}[0]
92 ; CHECK-DISABLED-NOT: vdup
93 switch i32 %vsout, label %sw.epilog [
98 sw.bb: ; preds = %entry
99 %1 = insertelement <4 x float> %0, float 0.000000e+00, i32 0
102 sw.bb1: ; preds = %entry, %sw.bb
103 %sum.0 = phi <4 x float> [ %0, %entry ], [ %1, %sw.bb ]
104 %2 = extractelement <4 x float> %sum.0, i32 0
105 %conv = fptoui float %2 to i8
106 store i8 %conv, i8* %out, align 1
109 sw.epilog: ; preds = %entry, %sw.bb1