]> granicus.if.org Git - llvm/commit
AMDGPU: Undo sub x, c -> add x, -c canonicalization
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 30 Jan 2017 19:30:24 +0000 (19:30 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 30 Jan 2017 19:30:24 +0000 (19:30 +0000)
commit1c86edab5586efd51e596b5e9fa003debde8e509
treee49e10c88f4f1bbd19c0103973c1692692393eda
parent126abbe5833dee73e529e21abf66c1eaa8739173
AMDGPU: Undo sub x, c -> add x, -c canonicalization

This is worse if the original constant is an inline immediate.

This should also be done for 64-bit adds, but requires fixing
operand folding bugs first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293540 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInstrInfo.td
lib/Target/AMDGPU/SIInstructions.td
lib/Target/AMDGPU/VOP2Instructions.td
test/CodeGen/AMDGPU/s_addk_i32.ll
test/CodeGen/AMDGPU/shrink-add-sub-constant.ll [new file with mode: 0644]
test/CodeGen/AMDGPU/sub.i16.ll