Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon -enable-pipeliner < %s | FileCheck %s
      2 
      3 ; A test that the Phi rewrite logic is correct.
      4 
      5 ; CHECK: [[REG0:(r[0-9]+)]] = #0
      6 ; CHECK: loop0(.LBB0_[[LOOP:.]],
      7 ; CHECK: .LBB0_[[LOOP]]:
      8 ; CHECK: memh([[REG0]]+#0) = #0
      9 
     10 define void @f0() #0 {
     11 b0:
     12   %v0 = add i32 undef, -4
     13   br label %b1
     14 
     15 b1:                                               ; preds = %b1, %b0
     16   %v1 = phi i16* [ %v4, %b1 ], [ null, %b0 ]
     17   %v2 = phi i32 [ %v5, %b1 ], [ 0, %b0 ]
     18   %v3 = getelementptr inbounds i16, i16* %v1, i32 1
     19   store i16 0, i16* %v1, align 2
     20   %v4 = getelementptr inbounds i16, i16* %v1, i32 2
     21   store i16 0, i16* %v3, align 2
     22   %v5 = add nsw i32 %v2, 8
     23   %v6 = icmp slt i32 %v5, %v0
     24   br i1 %v6, label %b1, label %b2
     25 
     26 b2:                                               ; preds = %b1
     27   ret void
     28 }
     29 
     30 attributes #0 = { nounwind "target-cpu"="hexagonv55" }
     31