source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/Hexagon/hwloop3.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 715 bytes
Line 
1; RUN: llc -march=hexagon < %s | FileCheck %s
2;
3; Remove the unconditional jump to following instruction.
4
5; CHECK: endloop0
6; CHECK-NOT: jump [[L1:.]]
7; CHECK-NOT: [[L1]]
8
9define void @test(i32* nocapture %a, i32 %n) nounwind {
10entry:
11  br label %for.body
12
13for.body:
14  %arrayidx.phi = phi i32* [ %a, %entry ], [ %arrayidx.inc, %for.body ]
15  %i.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
16  %0 = load i32, i32* %arrayidx.phi, align 4
17  %add = add nsw i32 %0, 1
18  store i32 %add, i32* %arrayidx.phi, align 4
19  %inc = add nsw i32 %i.02, 1
20  %exitcond = icmp eq i32 %inc, 100
21  %arrayidx.inc = getelementptr i32, i32* %arrayidx.phi, i32 1
22  br i1 %exitcond, label %for.end, label %for.body
23
24for.end:
25  ret void
26}
27
Note: See TracBrowser for help on using the repository browser.