- (op (op X, C1), C2) -> (op X, (op C1, C2)) - (op (op X, C1), Y) -> (op (op X, Y), C1)
Some code duplication with the G_PTR_ADD reassociations unfortunately but no
easy way to avoid it that I can see.
Paths
| Differential D150230
[GlobalISel] Implement some binary reassociations, G_ADD for now ClosedPublic Authored by aemerson on May 9 2023, 3:19 PM.
Details Summary - (op (op X, C1), C2) -> (op X, (op C1, C2)) - (op (op X, C1), Y) -> (op (op X, Y), C1) Some code duplication with the G_PTR_ADD reassociations unfortunately but no
Diff Detail
Event TimelineComment Actions @arsenm The AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll test is failing but trying to run update_mir_test_checks.py fails with some error. Can you take a look to see if it's an issue with the test?
Comment Actions @arsenm ping. Do you know why the AMDGPU test doesn't work with update_mir_test_checks? Comment Actions
What is the error? update_mir_test_checks is pretty buggy with multiple run lines and multiple checks. I sometimes need to delete individual run lines to get it t work
This revision is now accepted and ready to land.Jun 8 2023, 4:29 PM This revision was landed with ongoing or failed builds.Jun 8 2023, 9:38 PM Closed by commit rG086601eac266: [GlobalISel] Implement some binary reassociations, G_ADD for now (authored by aemerson). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 529819 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.h
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizer-combiner-binop-reassoc.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.buffer.load.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll
|
might as well just return false here if !C1 to save a level of indentation