AMDGPU/SI: select S_ABS_I32 when possible (v2)
authorMarek Olsak <marek.olsak@amd.com>
Wed, 25 Nov 2015 21:22:45 +0000 (21:22 +0000)
committerMarek Olsak <marek.olsak@amd.com>
Wed, 25 Nov 2015 21:22:45 +0000 (21:22 +0000)
commit73f0848ca2cf7676d72e8cd6f74f4896d5007756
treee6dd8ab609a62c973a48daf7f95f14bd1e6e443c
parent2aff4b612e0fa7adc98204cfc8403d26775ccb39
AMDGPU/SI: select S_ABS_I32 when possible (v2)

v2: added more tests, moved the SALU->VALU conversion to a separate function

It looks like it's not possible to get subregisters in the S_ABS lowering
code, and I don't feel like guessing without testing what the correct code
would look like.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254095 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInstrInfo.cpp
lib/Target/AMDGPU/SIInstrInfo.h
lib/Target/AMDGPU/SIInstructions.td
test/CodeGen/AMDGPU/llvm.AMDGPU.abs.ll
test/CodeGen/AMDGPU/sminmax.ll [new file with mode: 0644]