brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 2c52a25 Raw
46 lines · plain
1;RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3; Test that a hardware loop is not generaetd due to a potential4; underflow.5 6; CHECK-NOT: loop07 8define i32 @main() #0 {9entry:10  br label %while.cond.outer11 12while.cond.outer.loopexit:13  %.lcssa = phi i32 [ %0, %for.body.preheader ]14  br label %while.cond.outer15 16while.cond.outer:17  %i.0.ph = phi i32 [ 0, %entry ], [ 3, %while.cond.outer.loopexit ]18  %j.0.ph = phi i32 [ 0, %entry ], [ %.lcssa, %while.cond.outer.loopexit ]19  %k.0.ph = phi i32 [ 0, %entry ], [ 1, %while.cond.outer.loopexit ]20  br label %while.cond21 22while.cond:23  %i.0 = phi i32 [ %i.0.ph, %while.cond.outer ], [ %inc, %for.body.preheader ]24  %j.0 = phi i32 [ %j.0.ph, %while.cond.outer ], [ %0, %for.body.preheader ]25  %inc = add nsw i32 %i.0, 126  %cmp = icmp slt i32 %i.0, 427  br i1 %cmp, label %for.body.preheader, label %while.end28 29for.body.preheader:30  %0 = add i32 %j.0, 331  %cmp5 = icmp eq i32 %inc, 332  br i1 %cmp5, label %while.cond.outer.loopexit, label %while.cond33 34while.end:35  %k.0.ph.lcssa = phi i32 [ %k.0.ph, %while.cond ]36  %inc.lcssa = phi i32 [ %inc, %while.cond ]37  %j.0.lcssa = phi i32 [ %j.0, %while.cond ]38  %cmp6 = icmp ne i32 %inc.lcssa, 539  %cmp7 = icmp ne i32 %j.0.lcssa, 1240  %or.cond = or i1 %cmp6, %cmp741  %cmp9 = icmp ne i32 %k.0.ph.lcssa, 142  %or.cond12 = or i1 %or.cond, %cmp943  %locflg.0 = zext i1 %or.cond12 to i3244  ret i32 %locflg.045}46