AMDGPU/SI: Canonicalize offset order for merged DS instructions
authorTom Stellard <thomas.stellard@amd.com>
Fri, 26 Aug 2016 21:36:47 +0000 (21:36 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 26 Aug 2016 21:36:47 +0000 (21:36 +0000)
commite175d8aba57e8a21e1001918c527cdbee10c8332
treeef85b6ed3285033bf71be47d67756e086fbc6919
parent66a1cbce30c198676bbb76b20317e1d3a350ddbc
AMDGPU/SI: Canonicalize offset order for merged DS instructions

Summary:
If the scheduler clusters the loads, then the offsets will be sorted,
but it is possible for the scheduler to scheduler loads together
without out explicitly clustering them, which would give us non-sorted
offsets.

Also, we will want to do this if we move the load/store optimizer before
the scheduler.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits, kzhuravl

Differential Revision: https://reviews.llvm.org/D23776

llvm-svn: 279870
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
llvm/test/CodeGen/AMDGPU/ds_read2_offset_order.ll
llvm/test/CodeGen/AMDGPU/ds_read2st64.ll
llvm/test/CodeGen/AMDGPU/load-local-i16.ll
llvm/test/CodeGen/AMDGPU/load-local-i32.ll
llvm/test/CodeGen/AMDGPU/load-local-i8.ll
llvm/test/CodeGen/AMDGPU/local-64.ll