brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.5 KiB · de0f208 Raw
168 lines · plain
1; RUN: llc -mtriple=hexagon < %s2; REQUIRES: asserts3 4; Thie tests checks a compiler assert. So the test just needs to compile for it to pass5target triple = "hexagon-unknown--elf"6 7%struct.buffer_t = type { i64, ptr, [4 x i32], [4 x i32], [4 x i32], i32, i8, i8, [6 x i8] }8 9; Function Attrs: norecurse nounwind10define i32 @__testOne(ptr noalias nocapture readonly %inputOne.buffer, ptr noalias nocapture readonly %inputTwo.buffer, ptr noalias nocapture readonly %testOne.buffer) #0 {11entry:12  %buf_host = getelementptr inbounds %struct.buffer_t, ptr %inputOne.buffer, i32 0, i32 113  %inputOne.host = load ptr, ptr %buf_host, align 414  %buf_min = getelementptr inbounds %struct.buffer_t, ptr %inputOne.buffer, i32 0, i32 4, i32 015  %inputOne.min.0 = load i32, ptr %buf_min, align 416  %buf_host10 = getelementptr inbounds %struct.buffer_t, ptr %inputTwo.buffer, i32 0, i32 117  %inputTwo.host = load ptr, ptr %buf_host10, align 418  %buf_min22 = getelementptr inbounds %struct.buffer_t, ptr %inputTwo.buffer, i32 0, i32 4, i32 019  %inputTwo.min.0 = load i32, ptr %buf_min22, align 420  %buf_host27 = getelementptr inbounds %struct.buffer_t, ptr %testOne.buffer, i32 0, i32 121  %testOne.host = load ptr, ptr %buf_host27, align 422  %buf_extent31 = getelementptr inbounds %struct.buffer_t, ptr %testOne.buffer, i32 0, i32 2, i32 023  %testOne.extent.0 = load i32, ptr %buf_extent31, align 424  %buf_min39 = getelementptr inbounds %struct.buffer_t, ptr %testOne.buffer, i32 0, i32 4, i32 025  %testOne.min.0 = load i32, ptr %buf_min39, align 426  %0 = ashr i32 %testOne.extent.0, 427  %1 = icmp sgt i32 %0, 028  br i1 %1, label %"for testOne.s0.x.x.preheader", label %"end for testOne.s0.x.x"29 30"for testOne.s0.x.x.preheader":                   ; preds = %entry31  %2 = bitcast ptr %inputOne.host to ptr32  %3 = bitcast ptr %inputTwo.host to ptr33  %4 = bitcast ptr %testOne.host to ptr34  br label %"for testOne.s0.x.x"35 36"for testOne.s0.x.x":                             ; preds = %"for testOne.s0.x.x", %"for testOne.s0.x.x.preheader"37  %.phi = phi ptr [ %4, %"for testOne.s0.x.x.preheader" ], [ %.inc, %"for testOne.s0.x.x" ]38  %testOne.s0.x.x = phi i32 [ 0, %"for testOne.s0.x.x.preheader" ], [ %50, %"for testOne.s0.x.x" ]39  %5 = shl nsw i32 %testOne.s0.x.x, 440  %6 = add nsw i32 %5, %testOne.min.041  %7 = shl nsw i32 %6, 142  %8 = sub nsw i32 %7, %inputOne.min.043  %9 = getelementptr inbounds i16, ptr %2, i32 %844  %10 = bitcast ptr %9 to ptr45  %11 = load <16 x i16>, ptr %10, align 2, !tbaa !546  %12 = add nsw i32 %8, 1547  %13 = getelementptr inbounds i16, ptr %2, i32 %1248  %14 = bitcast ptr %13 to ptr49  %15 = load <16 x i16>, ptr %14, align 2, !tbaa !550  %16 = shufflevector <16 x i16> %11, <16 x i16> %15, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>51  %17 = add nsw i32 %8, 152  %18 = getelementptr inbounds i16, ptr %2, i32 %1753  %19 = bitcast ptr %18 to ptr54  %20 = load <16 x i16>, ptr %19, align 2, !tbaa !555  %21 = add nsw i32 %8, 1656  %22 = getelementptr inbounds i16, ptr %2, i32 %2157  %23 = bitcast ptr %22 to ptr58  %24 = load <16 x i16>, ptr %23, align 2, !tbaa !559  %25 = shufflevector <16 x i16> %20, <16 x i16> %24, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>60  %26 = shufflevector <16 x i16> %16, <16 x i16> %25, <32 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>61  %27 = sub nsw i32 %7, %inputTwo.min.062  %28 = getelementptr inbounds i16, ptr %3, i32 %2763  %29 = bitcast ptr %28 to ptr64  %30 = load <16 x i16>, ptr %29, align 2, !tbaa !865  %31 = add nsw i32 %27, 1566  %32 = getelementptr inbounds i16, ptr %3, i32 %3167  %33 = bitcast ptr %32 to ptr68  %34 = load <16 x i16>, ptr %33, align 2, !tbaa !869  %35 = shufflevector <16 x i16> %30, <16 x i16> %34, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>70  %36 = add nsw i32 %27, 171  %37 = getelementptr inbounds i16, ptr %3, i32 %3672  %38 = bitcast ptr %37 to ptr73  %39 = load <16 x i16>, ptr %38, align 2, !tbaa !874  %40 = add nsw i32 %27, 1675  %41 = getelementptr inbounds i16, ptr %3, i32 %4076  %42 = bitcast ptr %41 to ptr77  %43 = load <16 x i16>, ptr %42, align 2, !tbaa !878  %44 = shufflevector <16 x i16> %39, <16 x i16> %43, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>79  %45 = shufflevector <16 x i16> %35, <16 x i16> %44, <32 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>80  %46 = bitcast <32 x i16> %26 to <16 x i32>81  %47 = bitcast <32 x i16> %45 to <16 x i32>82  %48 = tail call <16 x i32> @llvm.hexagon.V6.vdmpyhvsat(<16 x i32> %46, <16 x i32> %47)83  %49 = bitcast ptr %.phi to ptr84  store <16 x i32> %48, ptr %49, align 4, !tbaa !1085  %50 = add nuw nsw i32 %testOne.s0.x.x, 186  %51 = icmp eq i32 %50, %087  %.inc = getelementptr i32, ptr %.phi, i32 1688  br i1 %51, label %"end for testOne.s0.x.x", label %"for testOne.s0.x.x"89 90"end for testOne.s0.x.x":                         ; preds = %"for testOne.s0.x.x", %entry91  %52 = add nsw i32 %testOne.extent.0, 1592  %53 = ashr i32 %52, 493  %54 = icmp sgt i32 %53, %094  br i1 %54, label %"for testOne.s0.x.x44.preheader", label %destructor_block95 96"for testOne.s0.x.x44.preheader":                 ; preds = %"end for testOne.s0.x.x"97  %55 = add nsw i32 %testOne.min.0, %testOne.extent.098  %56 = shl nsw i32 %55, 199  %57 = sub nsw i32 %56, %inputOne.min.0100  %58 = add nsw i32 %57, -32101  %59 = bitcast ptr %inputOne.host to ptr102  %60 = getelementptr inbounds i16, ptr %59, i32 %58103  %61 = bitcast ptr %60 to ptr104  %62 = load <16 x i16>, ptr %61, align 2105  %63 = add nsw i32 %57, -17106  %64 = getelementptr inbounds i16, ptr %59, i32 %63107  %65 = bitcast ptr %64 to ptr108  %66 = load <16 x i16>, ptr %65, align 2109  %67 = add nsw i32 %57, -31110  %68 = getelementptr inbounds i16, ptr %59, i32 %67111  %69 = bitcast ptr %68 to ptr112  %70 = load <16 x i16>, ptr %69, align 2113  %71 = add nsw i32 %57, -16114  %72 = getelementptr inbounds i16, ptr %59, i32 %71115  %73 = bitcast ptr %72 to ptr116  %74 = load <16 x i16>, ptr %73, align 2117  %75 = shufflevector <16 x i16> %70, <16 x i16> %74, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>118  %76 = sub nsw i32 %56, %inputTwo.min.0119  %77 = add nsw i32 %76, -32120  %78 = bitcast ptr %inputTwo.host to ptr121  %79 = getelementptr inbounds i16, ptr %78, i32 %77122  %80 = bitcast ptr %79 to ptr123  %81 = load <16 x i16>, ptr %80, align 2124  %82 = add nsw i32 %76, -17125  %83 = getelementptr inbounds i16, ptr %78, i32 %82126  %84 = bitcast ptr %83 to ptr127  %85 = load <16 x i16>, ptr %84, align 2128  %86 = shufflevector <16 x i16> %81, <16 x i16> %85, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>129  %87 = add nsw i32 %76, -31130  %88 = getelementptr inbounds i16, ptr %78, i32 %87131  %89 = bitcast ptr %88 to ptr132  %90 = load <16 x i16>, ptr %89, align 2133  %91 = add nsw i32 %76, -16134  %92 = getelementptr inbounds i16, ptr %78, i32 %91135  %93 = bitcast ptr %92 to ptr136  %94 = load <16 x i16>, ptr %93, align 2137  %95 = shufflevector <16 x i16> %90, <16 x i16> %94, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>138  %96 = shufflevector <16 x i16> %86, <16 x i16> %95, <32 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>139  %97 = bitcast <32 x i16> %96 to <16 x i32>140  %98 = add nsw i32 %testOne.extent.0, -16141  %99 = bitcast ptr %testOne.host to ptr142  %100 = getelementptr inbounds i32, ptr %99, i32 %98143  %101 = shufflevector <16 x i16> %62, <16 x i16> %66, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>144  %102 = shufflevector <16 x i16> %101, <16 x i16> %75, <32 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>145  %103 = bitcast <32 x i16> %102 to <16 x i32>146  %104 = tail call <16 x i32> @llvm.hexagon.V6.vdmpyhvsat(<16 x i32> %103, <16 x i32> %97)147  %105 = bitcast ptr %100 to ptr148  store <16 x i32> %104, ptr %105, align 4, !tbaa !10149  br label %destructor_block150 151destructor_block:                                 ; preds = %"for testOne.s0.x.x44.preheader", %"end for testOne.s0.x.x"152  ret i32 0153}154 155; Function Attrs: nounwind readnone156declare <16 x i32> @llvm.hexagon.V6.vdmpyhvsat(<16 x i32>, <16 x i32>) #1157 158attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }159attributes #1 = { nounwind readnone "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }160 161!5 = !{!6, !6, i64 0}162!6 = !{!"inputOne", !7}163!7 = !{!"Halide buffer"}164!8 = !{!9, !9, i64 0}165!9 = !{!"inputTwo", !7}166!10 = !{!11, !11, i64 0}167!11 = !{!"testOne", !7}168