AMDGPU: Handle sub of constant for DS offset folding
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 8 Sep 2015 19:34:22 +0000 (19:34 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 8 Sep 2015 19:34:22 +0000 (19:34 +0000)
commit626338d11e0648942edac61d00f5bd59302c2382
tree28efc45eec5e484ff35c9c33dce647786561d100
parent965f2c2437c272146c447eb1775c65abd3d4bb57
AMDGPU: Handle sub of constant for DS offset folding

sub C, x - > add (sub 0, x), C for DS offsets.

This is mostly to fix regressions that show up when
SeparateConstOffsetFromGEP is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247054 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
test/CodeGen/AMDGPU/ds-sub-offset.ll [new file with mode: 0644]