[all-commits] [llvm/llvm-project] b35833: [GlobalISel][AMDGPU] Legalize saturating add/subtract
jayfoad via All-commits
all-commits at lists.llvm.org
Thu Jul 23 06:07:05 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b35833b84e95c42ca7166232e193b2b8e221b56a
https://github.com/llvm/llvm-project/commit/b35833b84e95c42ca7166232e193b2b8e221b56a
Author: Jay Foad <jay.foad at amd.com>
Date: 2020-07-23 (Thu, 23 Jul 2020)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
M llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddsat.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubsat.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uaddsat.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-usubsat.mir
A llvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
A llvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
A llvm/test/CodeGen/AMDGPU/GlobalISel/uaddsat.ll
A llvm/test/CodeGen/AMDGPU/GlobalISel/usubsat.ll
Log Message:
-----------
[GlobalISel][AMDGPU] Legalize saturating add/subtract
Add support in LegalizerHelper for lowering G_SADDSAT etc. either
using add/subtract-with-overflow or using max/min instructions.
Enable this lowering for AMDGPU so it can be tested. The legalization
rules are still approximate and skips out on using the clamp bit to
treat these as legal, which has never been used before. This also
doesn't yet try to deal with expanding SALU cases.
More information about the All-commits
mailing list