1*2208c97cSFangrui Song; RUN: llc -mtriple=hexagon -mattr=+hvxv68,+hvx-length128b < %s | FileCheck %s 276e3759dSIkhlas Ajbar 376e3759dSIkhlas Ajbar; Check that ordering objects on the stack from the largest to the smallest has 476e3759dSIkhlas Ajbar; decreased the space allocated on the stack by 512 Bytes. 576e3759dSIkhlas Ajbar 676e3759dSIkhlas Ajbar; CHECK: allocframe(r29,#2432):raw 776e3759dSIkhlas Ajbar 876e3759dSIkhlas Ajbardefine void @test(ptr nocapture readonly %arg, ptr nocapture writeonly %arg1, i32 %arg2) local_unnamed_addr { 976e3759dSIkhlas Ajbarbb: 1076e3759dSIkhlas Ajbar %shl = shl i32 %arg2, 5 1176e3759dSIkhlas Ajbar br label %bb3 1276e3759dSIkhlas Ajbar 1376e3759dSIkhlas Ajbarbb3: 1476e3759dSIkhlas Ajbar %phi = phi i32 [ 0, %bb ], [ %add13, %bb3 ] 1576e3759dSIkhlas Ajbar %add = add i32 %phi, %shl 1676e3759dSIkhlas Ajbar %sext = sext i32 %add to i64 1776e3759dSIkhlas Ajbar %getelementptr = getelementptr float, ptr %arg, i64 %sext 1876e3759dSIkhlas Ajbar %load = load <32 x float>, ptr %getelementptr, align 4 1976e3759dSIkhlas Ajbar %fmul = fmul <32 x float> %load, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01> 2076e3759dSIkhlas Ajbar %fmul4 = fmul <32 x float> %load, <float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000, float 0x3FE9884620000000> 2176e3759dSIkhlas Ajbar %fmul5 = fmul <32 x float> %load, <float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000, float 0x3FA2444180000000> 2276e3759dSIkhlas Ajbar %fmul6 = fmul <32 x float> %load, %fmul5 2376e3759dSIkhlas Ajbar %fmul7 = fmul <32 x float> %load, %fmul6 2476e3759dSIkhlas Ajbar %fadd = fadd <32 x float> %fmul4, %fmul7 2576e3759dSIkhlas Ajbar %fmul8 = fmul <32 x float> %fadd, <float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00> 2676e3759dSIkhlas Ajbar %call = tail call <32 x float> @llvm.exp.v32f32(<32 x float> %fmul8) 2776e3759dSIkhlas Ajbar %fsub = fsub <32 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, %call 2876e3759dSIkhlas Ajbar %fadd9 = fadd <32 x float> %call, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00> 2976e3759dSIkhlas Ajbar %fdiv = fdiv <32 x float> %fsub, %fadd9 3076e3759dSIkhlas Ajbar %fadd10 = fadd <32 x float> %fdiv, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00> 3176e3759dSIkhlas Ajbar %fmul11 = fmul <32 x float> %fmul, %fadd10 3276e3759dSIkhlas Ajbar %getelementptr12 = getelementptr float, ptr %arg1, i64 %sext 3376e3759dSIkhlas Ajbar store <32 x float> %fmul11, ptr %getelementptr12, align 128 3476e3759dSIkhlas Ajbar %add13 = add nuw nsw i32 %phi, 128 3576e3759dSIkhlas Ajbar %icmp = icmp ult i32 %phi, 8064 3676e3759dSIkhlas Ajbar br i1 %icmp, label %bb3, label %bb14 3776e3759dSIkhlas Ajbar 3876e3759dSIkhlas Ajbarbb14: 3976e3759dSIkhlas Ajbar ret void 4076e3759dSIkhlas Ajbar} 4176e3759dSIkhlas Ajbar 4276e3759dSIkhlas Ajbardeclare <32 x float> @llvm.exp.v32f32(<32 x float>) 43