OSDN Git Service

AMDGPU/SI: Fix read2 merging into a super register.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 14 Jul 2015 17:57:36 +0000 (17:57 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 14 Jul 2015 17:57:36 +0000 (17:57 +0000)
commit3aa0d7cb535392d8733daa41c12cf8c86895e4d9
treed33dc9b4949a7117589b0f8cc1ca44c514e43656
parent2addf067a2165bc5e870c9dbc190447f78f79b51
AMDGPU/SI: Fix read2 merging into a super register.

If the read2 produced was supposed to be writing into a
super register, it would use the wrong subregister indices.
Fix this by inserting copies, so we only ever write to a vreg_64.
Run the register coalescer again to clean this up, although this
isn't ideal and often does result in an extra move.

Also remove the assert that offset1 > offset0.

There isn't a real reason to not allow this other than a minor
convenience in the compiler, and it doesn't seem worth the effort
of avoiding it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242174 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
test/CodeGen/AMDGPU/ds_read2.ll
test/CodeGen/AMDGPU/ds_read2_offset_order.ll
test/CodeGen/AMDGPU/ds_read2_superreg.ll [new file with mode: 0644]
test/CodeGen/AMDGPU/ds_read2st64.ll
test/CodeGen/AMDGPU/ds_write2.ll
test/CodeGen/AMDGPU/ds_write2st64.ll