diff options
| author | Tom Stellard <thomas.stellard@amd.com> | 2013-11-15 00:12:45 +0000 |
|---|---|---|
| committer | Tom Stellard <thomas.stellard@amd.com> | 2013-11-15 00:12:45 +0000 |
| commit | 8f9fc2075142747107ab6f0116fe7dad7c96a66c (patch) | |
| tree | fd8eda3fb90d6f6392c716212475a8d1bb277950 /llvm/test/CodeGen/R600/local-memory-two-objects.ll | |
| parent | 5fe806e7a49d93d33e619ca05128a00ccabe87c0 (diff) | |
| download | bcm5719-llvm-8f9fc2075142747107ab6f0116fe7dad7c96a66c.tar.gz bcm5719-llvm-8f9fc2075142747107ab6f0116fe7dad7c96a66c.zip | |
R600: Fix scheduling of instructions that use the LDS output queue
The LDS output queue is accessed via the OQAP register. The OQAP
register cannot be live across clauses, so if value is written to the
output queue, it must be retrieved before the end of the clause.
With the machine scheduler, we cannot statisfy this constraint, because
it lacks proper alias analysis and it will mark some LDS accesses as
having a chain dependency on vertex fetches. Since vertex fetches
require a new clauses, the dependency may end up spiltting OQAP uses and
defs so the end up in different clauses. See the lds-output-queue.ll
test for a more detailed explanation.
To work around this issue, we now combine the LDS read and the OQAP
copy into one instruction and expand it after register allocation.
This patch also adds some checks to the EmitClauseMarker pass, so that
it doesn't end a clause with a value still in the output queue and
removes AR.X and OQAP handling from the scheduler (AR.X uses and defs
were already being expanded post-RA, so the scheduler will never see
them).
Reviewed-by: Vincent Lejeune <vljn at ovi.com>
llvm-svn: 194755
Diffstat (limited to 'llvm/test/CodeGen/R600/local-memory-two-objects.ll')
| -rw-r--r-- | llvm/test/CodeGen/R600/local-memory-two-objects.ll | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/R600/local-memory-two-objects.ll b/llvm/test/CodeGen/R600/local-memory-two-objects.ll index b413fe3a599..e2d840645d0 100644 --- a/llvm/test/CodeGen/R600/local-memory-two-objects.ll +++ b/llvm/test/CodeGen/R600/local-memory-two-objects.ll @@ -12,9 +12,11 @@ ; SI-CHECK: .long 47180 ; SI-CHECK-NEXT: .long 32768 -; Make sure the lds writes are using different addresses. -; EG-CHECK: LDS_WRITE {{[*]*}} {{PV|T}}[[ADDRW:[0-9]*\.[XYZW]]] -; EG-CHECK-NOT: LDS_WRITE {{[*]*}} T[[ADDRW]] +; We would like to check the the lds writes are using different +; addresses, but due to variations in the scheduler, we can't do +; this consistently on evergreen GPUs. +; EG-CHECK: LDS_WRITE +; EG-CHECK: LDS_WRITE ; SI-CHECK: DS_WRITE_B32 0, {{v[0-9]*}}, v[[ADDRW:[0-9]*]] ; SI-CHECK-NOT: DS_WRITE_B32 0, {{v[0-9]*}}, v[[ADDRW]] |

