brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.7 KiB · fb70179 Raw
117 lines · plain
1; RUN: llc -mtriple=hexagon -mcpu=hexagonv73 -O2 -mattr=+hvxv73,hvx-length64b \2; RUN: -debug-only=hexagon-loop-align 2>&1 < %s | FileCheck %s3; Validate that there are 4 bundles in the loop.4; REQUIRES: asserts5 6; CHECK: Loop Align Pass:7; CHECK: Bundle Count : 48; CHECK: .p2align{{.*}}59 10; Function Attrs: nounwind11define void @ham(ptr noalias nocapture readonly %arg, i32 %arg1, i32 %arg2, i32 %arg3, ptr noalias nocapture %arg4, i32 %arg5) #0 {12bb:13  %ashr = ashr i32 %arg3, 214  %ashr6 = ashr i32 %arg3, 115  %add = add nsw i32 %ashr6, %ashr16  %icmp = icmp sgt i32 %arg2, 017  br i1 %icmp, label %bb7, label %bb6118 19bb7:                                              ; preds = %bb20  %sdiv = sdiv i32 %arg1, 6421  %icmp8 = icmp sgt i32 %arg1, 6322  br label %bb923 24bb9:                                              ; preds = %bb57, %bb725  %phi = phi i32 [ 0, %bb7 ], [ %add58, %bb57 ]26  %ashr10 = ashr exact i32 %phi, 127  %mul = mul nsw i32 %ashr10, %arg328  br i1 %icmp8, label %bb11, label %bb5729 30bb11:                                             ; preds = %bb931  %add12 = add nsw i32 %phi, 132  %mul13 = mul nsw i32 %add12, %arg533  %mul14 = mul nsw i32 %phi, %arg534  %add15 = add i32 %add, %mul35  %add16 = add i32 %mul, %ashr36  %add17 = add i32 %mul, %ashr637  %getelementptr = getelementptr inbounds i8, ptr %arg4, i32 %mul1338  %getelementptr18 = getelementptr inbounds i8, ptr %arg4, i32 %mul1439  %getelementptr19 = getelementptr inbounds i16, ptr %arg, i32 %add1540  %getelementptr20 = getelementptr inbounds i16, ptr %arg, i32 %add1641  %getelementptr21 = getelementptr inbounds i16, ptr %arg, i32 %add1742  %getelementptr22 = getelementptr inbounds i16, ptr %arg, i32 %mul43  %bitcast = bitcast ptr %getelementptr to ptr44  %bitcast23 = bitcast ptr %getelementptr18 to ptr45  %bitcast24 = bitcast ptr %getelementptr19 to ptr46  %bitcast25 = bitcast ptr %getelementptr20 to ptr47  %bitcast26 = bitcast ptr %getelementptr21 to ptr48  %bitcast27 = bitcast ptr %getelementptr22 to ptr49  br label %bb2850 51bb28:                                             ; preds = %bb28, %bb1152  %phi29 = phi i32 [ 0, %bb11 ], [ %add54, %bb28 ]53  %phi30 = phi ptr [ %bitcast27, %bb11 ], [ %getelementptr36, %bb28 ]54  %phi31 = phi ptr [ %bitcast26, %bb11 ], [ %getelementptr37, %bb28 ]55  %phi32 = phi ptr [ %bitcast25, %bb11 ], [ %getelementptr39, %bb28 ]56  %phi33 = phi ptr [ %bitcast24, %bb11 ], [ %getelementptr41, %bb28 ]57  %phi34 = phi ptr [ %bitcast, %bb11 ], [ %getelementptr53, %bb28 ]58  %phi35 = phi ptr [ %bitcast23, %bb11 ], [ %getelementptr52, %bb28 ]59  %getelementptr36 = getelementptr inbounds <16 x i32>, ptr %phi30, i32 160  %load = load <16 x i32>, ptr %phi30, align 6461  %getelementptr37 = getelementptr inbounds <16 x i32>, ptr %phi31, i32 162  %load38 = load <16 x i32>, ptr %phi31, align 6463  %getelementptr39 = getelementptr inbounds <16 x i32>, ptr %phi32, i32 164  %load40 = load <16 x i32>, ptr %phi32, align 6465  %getelementptr41 = getelementptr inbounds <16 x i32>, ptr %phi33, i32 166  %load42 = load <16 x i32>, ptr %phi33, align 6467  %call = tail call <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32> %load, <16 x i32> %load38)68  %call43 = tail call <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32> %load, <16 x i32> %load38)69  %call44 = tail call <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32> %load40, <16 x i32> %load42)70  %call45 = tail call <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32> %load40, <16 x i32> %load42)71  %call46 = tail call <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32> %call, <16 x i32> %call44)72  %call47 = tail call <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32> %call, <16 x i32> %call44)73  %call48 = tail call <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32> %call43, <16 x i32> %call45)74  %call49 = tail call <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32> %call43, <16 x i32> %call45)75  %call50 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %call47, <16 x i32> %call46)76  %call51 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %call49, <16 x i32> %call48)77  %getelementptr52 = getelementptr inbounds <16 x i32>, ptr %phi35, i32 178  store <16 x i32> %call50, ptr %phi35, align 6479  %getelementptr53 = getelementptr inbounds <16 x i32>, ptr %phi34, i32 180  store <16 x i32> %call51, ptr %phi34, align 6481  %add54 = add nsw i32 %phi29, 182  %icmp55 = icmp slt i32 %add54, %sdiv83  br i1 %icmp55, label %bb28, label %bb5684 85bb56:                                             ; preds = %bb2886  br label %bb5787 88bb57:                                             ; preds = %bb56, %bb989  %add58 = add nsw i32 %phi, 290  %icmp59 = icmp slt i32 %add58, %arg291  br i1 %icmp59, label %bb9, label %bb6092 93bb60:                                             ; preds = %bb5794  br label %bb6195 96bb61:                                             ; preds = %bb60, %bb97  ret void98}99 100; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)101declare <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32>, <16 x i32>) #1102 103; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)104declare <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32>, <16 x i32>) #1105 106; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)107declare <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32>, <16 x i32>) #1108 109; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)110declare <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32>, <16 x i32>) #1111 112; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)113declare <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32>, <16 x i32>) #1114 115attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }116attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }117