xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=armv7-eabi -mcpu=cortex-a8 -enable-unsafe-fp-math < %s
2*9880d681SAndroid Build Coastguard Worker; PR5367
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workerdefine arm_aapcs_vfpcc void @_Z27Benchmark_SceDualQuaternionPvm(i8* nocapture %pBuffer, i32 %numItems) nounwind {
5*9880d681SAndroid Build Coastguard Workerentry:
6*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %return, label %bb
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerbb:                                               ; preds = %bb, %entry
9*9880d681SAndroid Build Coastguard Worker  %0 = load float, float* undef, align 4                 ; <float> [#uses=1]
10*9880d681SAndroid Build Coastguard Worker  %1 = load float, float* null, align 4                  ; <float> [#uses=1]
11*9880d681SAndroid Build Coastguard Worker  %2 = insertelement <4 x float> undef, float undef, i32 1 ; <<4 x float>> [#uses=1]
12*9880d681SAndroid Build Coastguard Worker  %3 = insertelement <4 x float> %2, float %1, i32 2 ; <<4 x float>> [#uses=2]
13*9880d681SAndroid Build Coastguard Worker  %4 = insertelement <4 x float> undef, float %0, i32 2 ; <<4 x float>> [#uses=1]
14*9880d681SAndroid Build Coastguard Worker  %5 = insertelement <4 x float> %4, float 0.000000e+00, i32 3 ; <<4 x float>> [#uses=4]
15*9880d681SAndroid Build Coastguard Worker  %6 = fsub <4 x float> zeroinitializer, %3       ; <<4 x float>> [#uses=1]
16*9880d681SAndroid Build Coastguard Worker  %7 = shufflevector <4 x float> %6, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=2]
17*9880d681SAndroid Build Coastguard Worker  %8 = shufflevector <4 x float> %5, <4 x float> undef, <2 x i32> <i32 0, i32 1> ; <<2 x float>> [#uses=1]
18*9880d681SAndroid Build Coastguard Worker  %9 = shufflevector <2 x float> %8, <2 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x float>> [#uses=2]
19*9880d681SAndroid Build Coastguard Worker  %10 = fmul <4 x float> %7, %9                   ; <<4 x float>> [#uses=1]
20*9880d681SAndroid Build Coastguard Worker  %11 = shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
21*9880d681SAndroid Build Coastguard Worker  %12 = shufflevector <4 x float> %5, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=2]
22*9880d681SAndroid Build Coastguard Worker  %13 = shufflevector <2 x float> %12, <2 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
23*9880d681SAndroid Build Coastguard Worker  %14 = fmul <4 x float> %11, %13                 ; <<4 x float>> [#uses=1]
24*9880d681SAndroid Build Coastguard Worker  %15 = fadd <4 x float> %10, %14                 ; <<4 x float>> [#uses=1]
25*9880d681SAndroid Build Coastguard Worker  %16 = shufflevector <2 x float> %12, <2 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x float>> [#uses=1]
26*9880d681SAndroid Build Coastguard Worker  %17 = fadd <4 x float> %15, zeroinitializer     ; <<4 x float>> [#uses=1]
27*9880d681SAndroid Build Coastguard Worker  %18 = shufflevector <4 x float> %17, <4 x float> zeroinitializer, <4 x i32> <i32 0, i32 5, i32 undef, i32 undef> ; <<4 x float>> [#uses=1]
28*9880d681SAndroid Build Coastguard Worker  %19 = fmul <4 x float> %7, %16                  ; <<4 x float>> [#uses=1]
29*9880d681SAndroid Build Coastguard Worker  %20 = fadd <4 x float> %19, zeroinitializer     ; <<4 x float>> [#uses=1]
30*9880d681SAndroid Build Coastguard Worker  %21 = shufflevector <4 x float> %3, <4 x float> undef, <4 x i32> <i32 2, i32 undef, i32 undef, i32 undef> ; <<4 x float>> [#uses=1]
31*9880d681SAndroid Build Coastguard Worker  %22 = shufflevector <4 x float> %21, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
32*9880d681SAndroid Build Coastguard Worker  %23 = fmul <4 x float> %22, %9                  ; <<4 x float>> [#uses=1]
33*9880d681SAndroid Build Coastguard Worker  %24 = fadd <4 x float> %20, %23                 ; <<4 x float>> [#uses=1]
34*9880d681SAndroid Build Coastguard Worker  %25 = shufflevector <4 x float> %18, <4 x float> %24, <4 x i32> <i32 0, i32 1, i32 6, i32 undef> ; <<4 x float>> [#uses=1]
35*9880d681SAndroid Build Coastguard Worker  %26 = shufflevector <4 x float> %25, <4 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 7> ; <<4 x float>> [#uses=1]
36*9880d681SAndroid Build Coastguard Worker  %27 = fmul <4 x float> %26, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01> ; <<4 x float>> [#uses=1]
37*9880d681SAndroid Build Coastguard Worker  %28 = fsub <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, %5 ; <<4 x float>> [#uses=1]
38*9880d681SAndroid Build Coastguard Worker  %29 = tail call <4 x float> @llvm.arm.neon.vrecpe.v4f32(<4 x float> zeroinitializer) nounwind ; <<4 x float>> [#uses=1]
39*9880d681SAndroid Build Coastguard Worker  %30 = fmul <4 x float> zeroinitializer, %29     ; <<4 x float>> [#uses=1]
40*9880d681SAndroid Build Coastguard Worker  %31 = fmul <4 x float> %30, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00> ; <<4 x float>> [#uses=1]
41*9880d681SAndroid Build Coastguard Worker  %32 = shufflevector <4 x float> %27, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
42*9880d681SAndroid Build Coastguard Worker  %33 = shufflevector <4 x float> %28, <4 x float> undef, <2 x i32> <i32 2, i32 3> ; <<2 x float>> [#uses=1]
43*9880d681SAndroid Build Coastguard Worker  %34 = shufflevector <2 x float> %33, <2 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> ; <<4 x float>> [#uses=1]
44*9880d681SAndroid Build Coastguard Worker  %35 = fmul <4 x float> %32, %34                 ; <<4 x float>> [#uses=1]
45*9880d681SAndroid Build Coastguard Worker  %36 = fadd <4 x float> %35, zeroinitializer     ; <<4 x float>> [#uses=1]
46*9880d681SAndroid Build Coastguard Worker  %37 = shufflevector <4 x float> %5, <4 x float> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> ; <<4 x float>> [#uses=1]
47*9880d681SAndroid Build Coastguard Worker  %38 = shufflevector <4 x float> %37, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
48*9880d681SAndroid Build Coastguard Worker  %39 = fmul <4 x float> zeroinitializer, %38     ; <<4 x float>> [#uses=1]
49*9880d681SAndroid Build Coastguard Worker  %40 = fadd <4 x float> %36, %39                 ; <<4 x float>> [#uses=1]
50*9880d681SAndroid Build Coastguard Worker  %41 = fadd <4 x float> %40, zeroinitializer     ; <<4 x float>> [#uses=1]
51*9880d681SAndroid Build Coastguard Worker  %42 = shufflevector <4 x float> undef, <4 x float> %41, <4 x i32> <i32 0, i32 1, i32 6, i32 3> ; <<4 x float>> [#uses=1]
52*9880d681SAndroid Build Coastguard Worker  %43 = fmul <4 x float> %42, %31                 ; <<4 x float>> [#uses=1]
53*9880d681SAndroid Build Coastguard Worker  store float undef, float* undef, align 4
54*9880d681SAndroid Build Coastguard Worker  store float 0.000000e+00, float* null, align 4
55*9880d681SAndroid Build Coastguard Worker  %44 = extractelement <4 x float> %43, i32 1     ; <float> [#uses=1]
56*9880d681SAndroid Build Coastguard Worker  store float %44, float* undef, align 4
57*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %return, label %bb
58*9880d681SAndroid Build Coastguard Worker
59*9880d681SAndroid Build Coastguard Workerreturn:                                           ; preds = %bb, %entry
60*9880d681SAndroid Build Coastguard Worker  ret void
61*9880d681SAndroid Build Coastguard Worker}
62*9880d681SAndroid Build Coastguard Worker
63*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm.arm.neon.vrecpe.v4f32(<4 x float>) nounwind readnone
64