brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 686c3ef Raw
68 lines · plain
1; RUN: llc -mtriple=hexagon -mcpu=hexagonv5 -O3 < %s | FileCheck %s2 3; Test that we do not generate a hardware loop due to a potential underflow.4 5; CHECK-NOT: loop06 7%struct.3 = type { ptr, i8, i8, i32, i32, i16, i16, i16, i16, i16, i16, i16, ptr }8%struct.2 = type { i16, i16, i16, i16, ptr }9%struct.1 = type { ptr, ptr, i32, i32, i16, [2 x i16], [2 x i16], i16 }10%struct.0 = type { ptr, i32, i32, i32, i32, i32, i32, i16, i16, i16, i8, i8, i8, i8 }11 12@pairArray = external global ptr13@carray = external global ptr14 15define void @test() #0 {16entry:17  %0 = load ptr, ptr @pairArray, align 418  %1 = load ptr, ptr @carray, align 419  br i1 undef, label %for.end110, label %for.body20 21for.body:22  %row.0199 = phi i32 [ %inc109, %for.inc108 ], [ 1, %entry ]23  %arrayidx = getelementptr inbounds ptr, ptr %0, i32 %row.019924  %2 = load ptr, ptr %arrayidx, align 425  br i1 undef, label %for.body48, label %for.inc10826 27for.cond45:28  %cmp46 = icmp sgt i32 %dec58, 029  br i1 %cmp46, label %for.body48, label %for.inc10830 31for.body48:32  %i.1190 = phi i32 [ %dec58, %for.cond45 ], [ 0, %for.body ]33  %arrayidx50 = getelementptr inbounds i32, ptr %2, i32 %i.119034  %3 = load i32, ptr %arrayidx50, align 435  %cmp53 = icmp slt i32 %3, 036  %dec58 = add nsw i32 %i.1190, -137  br i1 %cmp53, label %for.end59, label %for.cond4538 39for.end59:40  %cmp60 = icmp slt i32 %i.1190, 041  br i1 %cmp60, label %if.then65, label %for.inc10842 43if.then65:44  br label %for.body8045 46for.body80:47  %j.1196.in = phi i32 [ %j.1196, %for.body80 ], [ %i.1190, %if.then65 ]48  %j.1196 = add nsw i32 %j.1196.in, 149  %arrayidx81 = getelementptr inbounds i32, ptr %2, i32 %j.119650  %4 = load i32, ptr %arrayidx81, align 451  %arrayidx82 = getelementptr inbounds ptr, ptr %1, i32 %452  %5 = load ptr, ptr %arrayidx82, align 453  %cxcenter83 = getelementptr inbounds %struct.3, ptr %5, i32 0, i32 354  store i32 0, ptr %cxcenter83, align 455  %6 = load i32, ptr %arrayidx81, align 456  %arrayidx87 = getelementptr inbounds i32, ptr %2, i32 %j.1196.in57  store i32 %6, ptr %arrayidx87, align 458  %exitcond = icmp eq i32 %j.1196, 059  br i1 %exitcond, label %for.inc108, label %for.body8060 61for.inc108:62  %inc109 = add nsw i32 %row.0199, 163  br i1 undef, label %for.body, label %for.end11064 65for.end110:66  ret void67}68