37 lines · plain
1; RUN: llc -mtriple=hexagon -hexagon-loop-range=0 < %s | FileCheck %s2 3; Test that the loop start address operand uses a constant extender4; if the offset is out of range.5 6; CHECK: loop0(##.LBB7; CHECK: endloop08 9@g = external global i32, align 410 11define void @test(ptr nocapture %a, ptr nocapture readonly %b, i32 %n) #0 {12entry:13 %cmp6 = icmp slt i32 %n, 114 br i1 %cmp6, label %for.end, label %for.body.preheader15 16for.body.preheader:17 br label %for.body18 19for.body:20 %i.07 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]21 %arrayidx = getelementptr inbounds i32, ptr %b, i32 %i.0722 %0 = load i32, ptr %arrayidx, align 423 %1 = load i32, ptr @g, align 424 %mul = mul nsw i32 %1, %025 %arrayidx1 = getelementptr inbounds i32, ptr %a, i32 %i.0726 store i32 %mul, ptr %arrayidx1, align 427 %inc = add nuw nsw i32 %i.07, 128 %exitcond = icmp eq i32 %inc, %n29 br i1 %exitcond, label %for.end.loopexit, label %for.body30 31for.end.loopexit:32 br label %for.end33 34for.end:35 ret void36}37