These checks show optimized instructions if an operand is known to be
(partially) zero.
Change-Id: Ie2f6d0d3ee9d5b279d1f4c1dd0787492e39cc77a
Paths
| Differential D140208
[AMDGPU] Improved wide multiplies ClosedPublic Authored by OutOfCache on Dec 16 2022, 5:00 AM.
Details Summary These checks show optimized instructions if an operand is known to be Change-Id: Ie2f6d0d3ee9d5b279d1f4c1dd0787492e39cc77a
Diff Detail
Event TimelineOutOfCache retitled this revision from [AMDGPU] Improved wide multiplies tests to [AMDGPU] Improved wide multiplies.Dec 16 2022, 5:14 AM
Comment Actions I guess we could get the same improvement by running the binop_right_to_zero combine post-legalization? Comment Actions Somethign went wrong during applying the patch. Could you please have a look? OutOfCache marked an inline comment as done and an inline comment as not done. Comment ActionsAdressing the redundant constructor and minor format issues
Comment Actions It seems like this is breaking the LegalizerHelper.h / the LegalizerHelperTest: LegalizerHelper Helper(*MF, Info, Observer, B); Comment Actions Improved tests with better naming. This comment was removed by OutOfCache. Comment Actions
Comment Actions Improved tests with better naming. Comment Actions Fixing constructor issues by moving the default parameter to the header. The default parameter for the new LegalizerHelper constructor has to be set Comment Actions Fixing constructor issues by moving the default parameter to the header. The default parameter for the new LegalizerHelper constructor has to be set Comment Actions
Fixed clang-format issue. Comment Actions
Fixed clang-format for good. Comment Actions A few nits / questions, otherwise LGTM.
Comment Actions Thanks, this already looks good to me. I do have a small number of comments inline still.
OutOfCache marked 9 inline comments as done. Comment Actions
OutOfCache added inline comments.
OutOfCache marked an inline comment as done. Comment Actions
OutOfCache added inline comments.
OutOfCache added inline comments.
Comment Actions Can you please add some MIR test cases in addition to your LLVM IR tests? You already put some example code in the discussion, but I believe a test that shows the transformation on a GMIR level could be helpful. Other than that, it looks good to me. Comment Actions Added MIR Tests for gfx10 and gfx11.
Comment Actions Remove gfx11 from MIR tests
Closed by commit rGfc672b6a8b48: [AMDGPU] Improved wide multiplies (authored by OutOfCache). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 499506 llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h
llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/mul-known-bits.i64.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/mul-known-bits.i64.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll
llvm/unittests/CodeGen/GlobalISel/LegalizerTest.cpp
|
Can you pre-commit the change to add GISelKnown bits to the legalizer