R600: Put PRED_X instruction in its own clause

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vincent Lejeune 2013-10-01 19:32:49 +00:00
parent 5b00e833fa
commit c6c37d74a2
5 changed files with 1190 additions and 6 deletions

View File

@ -173,6 +173,14 @@ private:
if (AluInstCount > TII->getMaxAlusPerClause())
break;
if (I->getOpcode() == AMDGPU::PRED_X) {
// We put PRED_X in its own clause to ensure that ifcvt won't create
// clauses with more than 128 insts.
// IfCvt is indeed checking that "then" and "else" branches of an if
// statement have less than ~60 insts thus converted clauses can't be
// bigger than ~121 insts (predicate setter needs to be in the same
// clause as predicated alus).
if (AluInstCount > 0)
break;
if (TII->getFlagOp(I).getImm() & MO_FLAG_PUSH)
PushBeforeModifier = true;
AluInstCount ++;

1177
test/CodeGen/R600/big_alu.ll Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
; CHECK: JUMP @5
; CHECK: JUMP @10
; CHECK: EXPORT
; CHECK-NOT: EXPORT

View File

@ -1,9 +1,9 @@
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
;CHECK: ALU_PUSH
;CHECK: LOOP_START_DX10 @11
;CHECK: LOOP_BREAK @10
;CHECK: POP @10
;CHECK: LOOP_START_DX10 @13
;CHECK: LOOP_BREAK @12
;CHECK: POP @12
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-v2048:2048:2048-n32:64"
target triple = "r600--"

View File

@ -30,8 +30,7 @@ ENDIF:
; CHECK: @test_b
; CHECK: SET{{[GTEQN]+}}_DX10
; CHECK-NEXT: PRED_
; CHECK-NEXT: ALU clause starting
; CHECK: PRED_
define void @test_b(i32 addrspace(1)* %out, float %in) {
entry:
%0 = fcmp olt float %in, 0.0