diff options
| author | Brendon Cahoon <bcahoon@codeaurora.org> | 2015-05-08 20:18:21 +0000 |
|---|---|---|
| committer | Brendon Cahoon <bcahoon@codeaurora.org> | 2015-05-08 20:18:21 +0000 |
| commit | bece8edcdde53f9854a7edfc27890333281541cc (patch) | |
| tree | 6ab06d6bb641c3def7b22544a194f9df460546df /llvm/test/CodeGen/Hexagon/hwloop-lt.ll | |
| parent | 82d9f037fe3cc48d645094cf271937c150036b13 (diff) | |
| download | bcm5719-llvm-bece8edcdde53f9854a7edfc27890333281541cc.tar.gz bcm5719-llvm-bece8edcdde53f9854a7edfc27890333281541cc.zip | |
[Hexagon] Generate more hardware loops
Refactored parts of the hardware loop pass to generate
more. Also, added more tests.
Differential Revision: http://reviews.llvm.org/D9568
llvm-svn: 236896
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/hwloop-lt.ll')
| -rw-r--r-- | llvm/test/CodeGen/Hexagon/hwloop-lt.ll | 149 |
1 files changed, 60 insertions, 89 deletions
diff --git a/llvm/test/CodeGen/Hexagon/hwloop-lt.ll b/llvm/test/CodeGen/Hexagon/hwloop-lt.ll index 804f76456e2..7e2ad2a4678 100644 --- a/llvm/test/CodeGen/Hexagon/hwloop-lt.ll +++ b/llvm/test/CodeGen/Hexagon/hwloop-lt.ll @@ -1,7 +1,6 @@ ; RUN: llc -march=hexagon -mcpu=hexagonv4 -O3 < %s | FileCheck %s - -; CHECK: test_pos1_ir_slt +; CHECK-LABEL: @test_pos1_ir_slt ; CHECK: loop0 ; a < b define void @test_pos1_ir_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -9,10 +8,10 @@ entry: %cmp3 = icmp slt i32 8531, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ 8531, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -24,13 +23,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos2_ir_slt +; CHECK-LABEL: @test_pos2_ir_slt ; CHECK: loop0 ; a < b define void @test_pos2_ir_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -38,10 +35,10 @@ entry: %cmp3 = icmp slt i32 9152, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ 9152, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -53,13 +50,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos4_ir_slt +; CHECK-LABEL: @test_pos4_ir_slt ; CHECK: loop0 ; a < b define void @test_pos4_ir_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -67,10 +62,10 @@ entry: %cmp3 = icmp slt i32 18851, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ 18851, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -82,13 +77,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos8_ir_slt +; CHECK-LABEL: @test_pos8_ir_slt ; CHECK: loop0 ; a < b define void @test_pos8_ir_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -96,10 +89,10 @@ entry: %cmp3 = icmp slt i32 25466, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ 25466, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -111,13 +104,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos16_ir_slt +; CHECK-LABEL: @test_pos16_ir_slt ; CHECK: loop0 ; a < b define void @test_pos16_ir_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -125,10 +116,10 @@ entry: %cmp3 = icmp slt i32 9295, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ 9295, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -140,13 +131,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos1_ri_slt +; CHECK-LABEL: @test_pos1_ri_slt ; CHECK: loop0 ; a < b define void @test_pos1_ri_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -154,10 +143,10 @@ entry: %cmp3 = icmp slt i32 %a, 31236 br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -169,13 +158,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, 31236 br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos2_ri_slt +; CHECK-LABEL: @test_pos2_ri_slt ; CHECK: loop0 ; a < b define void @test_pos2_ri_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -183,10 +170,10 @@ entry: %cmp3 = icmp slt i32 %a, 22653 br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -198,13 +185,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, 22653 br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos4_ri_slt +; CHECK-LABEL: @test_pos4_ri_slt ; CHECK: loop0 ; a < b define void @test_pos4_ri_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -212,10 +197,10 @@ entry: %cmp3 = icmp slt i32 %a, 1431 br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -227,13 +212,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, 1431 br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos8_ri_slt +; CHECK-LABEL: @test_pos8_ri_slt ; CHECK: loop0 ; a < b define void @test_pos8_ri_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -241,10 +224,10 @@ entry: %cmp3 = icmp slt i32 %a, 22403 br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -256,13 +239,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, 22403 br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos16_ri_slt +; CHECK-LABEL: @test_pos16_ri_slt ; CHECK: loop0 ; a < b define void @test_pos16_ri_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -270,10 +251,10 @@ entry: %cmp3 = icmp slt i32 %a, 21715 br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -285,13 +266,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, 21715 br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos1_rr_slt +; CHECK-LABEL: @test_pos1_rr_slt ; CHECK: loop0 ; a < b define void @test_pos1_rr_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -299,10 +278,10 @@ entry: %cmp3 = icmp slt i32 %a, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -314,13 +293,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos2_rr_slt +; CHECK-LABEL: @test_pos2_rr_slt ; CHECK: loop0 ; a < b define void @test_pos2_rr_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -328,10 +305,10 @@ entry: %cmp3 = icmp slt i32 %a, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -343,13 +320,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos4_rr_slt +; CHECK-LABEL: @test_pos4_rr_slt ; CHECK: loop0 ; a < b define void @test_pos4_rr_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -357,10 +332,10 @@ entry: %cmp3 = icmp slt i32 %a, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -372,13 +347,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos8_rr_slt +; CHECK-LABEL: @test_pos8_rr_slt ; CHECK: loop0 ; a < b define void @test_pos8_rr_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -386,10 +359,10 @@ entry: %cmp3 = icmp slt i32 %a, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -401,13 +374,11 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } - - -; CHECK: test_pos16_rr_slt +; CHECK-LABEL: @test_pos16_rr_slt ; CHECK: loop0 ; a < b define void @test_pos16_rr_slt(i8* nocapture %p, i32 %a, i32 %b) nounwind { @@ -415,10 +386,10 @@ entry: %cmp3 = icmp slt i32 %a, %b br i1 %cmp3, label %for.body.lr.ph, label %for.end -for.body.lr.ph: ; preds = %entry +for.body.lr.ph: br label %for.body -for.body: ; preds = %for.body.lr.ph, %for.body +for.body: %i.04 = phi i32 [ %a, %for.body.lr.ph ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds i8, i8* %p, i32 %i.04 %0 = load i8, i8* %arrayidx, align 1 @@ -430,7 +401,7 @@ for.body: ; preds = %for.body.lr.ph, %fo %cmp = icmp slt i32 %inc, %b br i1 %cmp, label %for.body, label %for.end -for.end: ; preds = %for.body, %entry +for.end: ret void } |

