Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon -mcpu=hexagonv5 -O2 -disable-block-placement=0 < %s | FileCheck %s
      2 
      3 ; Test that there is no redundant register assignment in the hardware loop
      4 ; preheader.
      5 
      6 ; CHECK-NOT: r{{.*}} = #5
      7 
      8 @g = external global i32
      9 
     10 define void @foo() #0 {
     11 entry:
     12   br i1 undef, label %if.end38, label %for.body
     13 
     14 for.body:
     15   %loopIdx.051 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
     16   store i32 1, i32* @g, align 4
     17   %inc = add i32 %loopIdx.051, 1
     18   %cmp9 = icmp ult i32 %inc, 5
     19   br i1 %cmp9, label %for.body, label %if.end38
     20 
     21 if.end38:
     22   ret void
     23 }
     24