xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/neon_spill.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -verify-machineinstrs
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -verify-machineinstrs -O0
3*9880d681SAndroid Build Coastguard Worker; PR12177
4*9880d681SAndroid Build Coastguard Worker;
5*9880d681SAndroid Build Coastguard Worker; This test case spills a QQQQ register.
6*9880d681SAndroid Build Coastguard Worker;
7*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
8*9880d681SAndroid Build Coastguard Workertarget triple = "armv7-none-linux-gnueabi"
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker%0 = type { %1*, i32, i32, i32, i8 }
11*9880d681SAndroid Build Coastguard Worker%1 = type { i32 (...)** }
12*9880d681SAndroid Build Coastguard Worker%2 = type { i8*, i8*, i8*, i32 }
13*9880d681SAndroid Build Coastguard Worker%3 = type { %4 }
14*9880d681SAndroid Build Coastguard Worker%4 = type { i32 (...)**, %2, %4*, i8, i8 }
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc void @func1(%0*, float* nocapture, float* nocapture, %2*) nounwind
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc %0** @func2()
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc %2* @func3(%2*, %2*, i32)
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc %2** @func4()
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Workerdefine arm_aapcs_vfpcc void @foo(%3* nocapture) nounwind align 2 {
25*9880d681SAndroid Build Coastguard Worker  call void @llvm.arm.neon.vst4.p0i8.v4i32(i8* undef, <4 x i32> <i32 0, i32 1065353216, i32 1073741824, i32 1077936128>, <4 x i32> <i32 1082130432, i32 1084227584, i32 1086324736, i32 1088421888>, <4 x i32> <i32 1090519040, i32 1091567616, i32 1092616192, i32 1093664768>, <4 x i32> <i32 1094713344, i32 1095761920, i32 1096810496, i32 1097859072>, i32 16) nounwind
26*9880d681SAndroid Build Coastguard Worker  %2 = call arm_aapcs_vfpcc  %0** @func2() nounwind
27*9880d681SAndroid Build Coastguard Worker  %3 = load %0*, %0** %2, align 4
28*9880d681SAndroid Build Coastguard Worker  store float 0.000000e+00, float* undef, align 4
29*9880d681SAndroid Build Coastguard Worker  %4 = call arm_aapcs_vfpcc  %2* @func3(%2* undef, %2* undef, i32 2956) nounwind
30*9880d681SAndroid Build Coastguard Worker  call arm_aapcs_vfpcc  void @func1(%0* %3, float* undef, float* undef, %2* undef)
31*9880d681SAndroid Build Coastguard Worker  %5 = call arm_aapcs_vfpcc  %0** @func2() nounwind
32*9880d681SAndroid Build Coastguard Worker  store float 1.000000e+00, float* undef, align 4
33*9880d681SAndroid Build Coastguard Worker  call arm_aapcs_vfpcc  void @func1(%0* undef, float* undef, float* undef, %2* undef)
34*9880d681SAndroid Build Coastguard Worker  store float 1.500000e+01, float* undef, align 4
35*9880d681SAndroid Build Coastguard Worker  %6 = call arm_aapcs_vfpcc  %2** @func4() nounwind
36*9880d681SAndroid Build Coastguard Worker  %7 = call arm_aapcs_vfpcc  %2* @func3(%2* undef, %2* undef, i32 2971) nounwind
37*9880d681SAndroid Build Coastguard Worker  %8 = fadd float undef, -1.000000e+05
38*9880d681SAndroid Build Coastguard Worker  store float %8, float* undef, align 16
39*9880d681SAndroid Build Coastguard Worker  %9 = call arm_aapcs_vfpcc  i32 @rand() nounwind
40*9880d681SAndroid Build Coastguard Worker  %10 = fmul float undef, 2.000000e+05
41*9880d681SAndroid Build Coastguard Worker  %11 = fadd float %10, -1.000000e+05
42*9880d681SAndroid Build Coastguard Worker  store float %11, float* undef, align 4
43*9880d681SAndroid Build Coastguard Worker  call void @llvm.arm.neon.vst4.p0i8.v4i32(i8* undef, <4 x i32> <i32 0, i32 1065353216, i32 1073741824, i32 1077936128>, <4 x i32> <i32 1082130432, i32 1084227584, i32 1086324736, i32 1088421888>, <4 x i32> <i32 1090519040, i32 1091567616, i32 1092616192, i32 1093664768>, <4 x i32> <i32 1094713344, i32 1095761920, i32 1096810496, i32 1097859072>, i32 16) nounwind
44*9880d681SAndroid Build Coastguard Worker  ret void
45*9880d681SAndroid Build Coastguard Worker}
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.arm.neon.vst4.p0i8.v4i32(i8*, <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32>, i32) nounwind
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Workerdeclare arm_aapcs_vfpcc i32 @rand()
50