118 lines · plain
1; RUN: llc -mtriple=hexagon -mcpu=hexagonv73 -O2 -mattr=+hvxv73,hvx-length64b < %s | FileCheck %s2; CHECK: .p2align{{.*}}53 4; Function Attrs: nounwind5define void @wobble(ptr noalias nocapture readonly %arg, i32 %arg1, i32 %arg2, i32 %arg3, ptr noalias nocapture %arg4, i32 %arg5) #0 {6bb:7 %ashr = ashr i32 %arg3, 28 %ashr6 = ashr i32 %arg3, 19 %add = add nsw i32 %ashr6, %ashr10 %icmp = icmp sgt i32 %arg2, 011 br i1 %icmp, label %bb7, label %bb6112 13bb7: ; preds = %bb14 %sdiv = sdiv i32 %arg1, 6415 %icmp8 = icmp sgt i32 %arg1, 6316 br label %bb917 18bb9: ; preds = %bb57, %bb719 %phi = phi i32 [ 0, %bb7 ], [ %add58, %bb57 ]20 %ashr10 = ashr exact i32 %phi, 121 %mul = mul nsw i32 %ashr10, %arg322 br i1 %icmp8, label %bb11, label %bb5723 24bb11: ; preds = %bb925 %add12 = add nsw i32 %phi, 126 %mul13 = mul nsw i32 %add12, %arg527 %mul14 = mul nsw i32 %phi, %arg528 %add15 = add i32 %add, %mul29 %add16 = add i32 %mul, %ashr30 %add17 = add i32 %mul, %ashr631 %getelementptr = getelementptr inbounds i8, ptr %arg4, i32 %mul1332 %getelementptr18 = getelementptr inbounds i8, ptr %arg4, i32 %mul1433 %getelementptr19 = getelementptr inbounds i16, ptr %arg, i32 %add1534 %getelementptr20 = getelementptr inbounds i16, ptr %arg, i32 %add1635 %getelementptr21 = getelementptr inbounds i16, ptr %arg, i32 %add1736 %getelementptr22 = getelementptr inbounds i16, ptr %arg, i32 %mul37 %bitcast = bitcast ptr %getelementptr to ptr38 %bitcast23 = bitcast ptr %getelementptr18 to ptr39 %bitcast24 = bitcast ptr %getelementptr19 to ptr40 %bitcast25 = bitcast ptr %getelementptr20 to ptr41 %bitcast26 = bitcast ptr %getelementptr21 to ptr42 %bitcast27 = bitcast ptr %getelementptr22 to ptr43 br label %bb2844 45bb28: ; preds = %bb28, %bb1146 %phi29 = phi i32 [ 0, %bb11 ], [ %add54, %bb28 ]47 %phi30 = phi ptr [ %bitcast27, %bb11 ], [ %getelementptr36, %bb28 ]48 %phi31 = phi ptr [ %bitcast26, %bb11 ], [ %getelementptr37, %bb28 ]49 %phi32 = phi ptr [ %bitcast25, %bb11 ], [ %getelementptr39, %bb28 ]50 %phi33 = phi ptr [ %bitcast24, %bb11 ], [ %getelementptr41, %bb28 ]51 %phi34 = phi ptr [ %bitcast, %bb11 ], [ %getelementptr53, %bb28 ]52 %phi35 = phi ptr [ %bitcast23, %bb11 ], [ %getelementptr52, %bb28 ]53 %getelementptr36 = getelementptr inbounds <16 x i32>, ptr %phi30, i32 154 %load = load <16 x i32>, ptr %phi30, align 64, !tbaa !155 %getelementptr37 = getelementptr inbounds <16 x i32>, ptr %phi31, i32 156 %load38 = load <16 x i32>, ptr %phi31, align 64, !tbaa !157 %getelementptr39 = getelementptr inbounds <16 x i32>, ptr %phi32, i32 158 %load40 = load <16 x i32>, ptr %phi32, align 64, !tbaa !159 %getelementptr41 = getelementptr inbounds <16 x i32>, ptr %phi33, i32 160 %load42 = load <16 x i32>, ptr %phi33, align 64, !tbaa !161 %call = tail call <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32> %load, <16 x i32> %load38)62 %call43 = tail call <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32> %load, <16 x i32> %load38)63 %call44 = tail call <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32> %load40, <16 x i32> %load42)64 %call45 = tail call <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32> %load40, <16 x i32> %load42)65 %call46 = tail call <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32> %call, <16 x i32> %call44)66 %call47 = tail call <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32> %call, <16 x i32> %call44)67 %call48 = tail call <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32> %call43, <16 x i32> %call45)68 %call49 = tail call <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32> %call43, <16 x i32> %call45)69 %call50 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %call47, <16 x i32> %call46)70 %call51 = tail call <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32> %call49, <16 x i32> %call48)71 %getelementptr52 = getelementptr inbounds <16 x i32>, ptr %phi35, i32 172 store <16 x i32> %call50, ptr %phi35, align 64, !tbaa !173 %getelementptr53 = getelementptr inbounds <16 x i32>, ptr %phi34, i32 174 store <16 x i32> %call51, ptr %phi34, align 64, !tbaa !175 %add54 = add nsw i32 %phi29, 176 %icmp55 = icmp slt i32 %add54, %sdiv77 br i1 %icmp55, label %bb28, label %bb5678 79bb56: ; preds = %bb2880 br label %bb5781 82bb57: ; preds = %bb56, %bb983 %add58 = add nsw i32 %phi, 284 %icmp59 = icmp slt i32 %add58, %arg285 br i1 %icmp59, label %bb9, label %bb6086 87bb60: ; preds = %bb5788 br label %bb6189 90bb61: ; preds = %bb60, %bb91 ret void92}93 94; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)95declare <16 x i32> @llvm.hexagon.V6.vaddh(<16 x i32>, <16 x i32>) #196 97; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)98declare <16 x i32> @llvm.hexagon.V6.vsubh(<16 x i32>, <16 x i32>) #199 100; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)101declare <16 x i32> @llvm.hexagon.V6.vavgh(<16 x i32>, <16 x i32>) #1102 103; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)104declare <16 x i32> @llvm.hexagon.V6.vnavgh(<16 x i32>, <16 x i32>) #1105 106; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)107declare <16 x i32> @llvm.hexagon.V6.vsathub(<16 x i32>, <16 x i32>) #1108 109attributes #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" }110attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }111 112!llvm.ident = !{!0}113 114!0 = !{!"Clang 3.1"}115!1 = !{!2, !2, i64 0}116!2 = !{!"omnipotent char", !3, i64 0}117!3 = !{!"Simple C/C++ TBAA"}118