[all-commits] [llvm/llvm-project] 96db12: AMDGPU/GlobalISel: Custom lower 32-bit G_UDIV/G_UREM
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Mon Feb 17 11:10:18 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 96db12d507fbac8b67278775d3234fa9b8178d22
https://github.com/llvm/llvm-project/commit/96db12d507fbac8b67278775d3234fa9b8178d22
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2020-02-17 (Mon, 17 Feb 2020)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sdiv.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-srem.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-udiv.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-urem.mir
A llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i32.ll
A llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i32.ll
Log Message:
-----------
AMDGPU/GlobalISel: Custom lower 32-bit G_UDIV/G_UREM
AMDGPUCodeGenPrepare expands this most of the time, but not always. We
will always at least need a fallback option here. This is the 3rd
implementation of the same expansion in the backend. Eventually I
would like to eliminate the IR expansion (and the DAG version
obviously).
Currently the new legalizer path produces a better result, since the
IR expansion results in extra operations which need to be combined
out. Notably, the IR expansion results in multiplies by 0.
More information about the All-commits
mailing list