This was disabled to prevent regressions, which appear to be just occurring on AMDGPU (at least in our current lit tests).
Fixes #57872
Paths
| Differential D136042
[DAG] Enable combineShiftOfShiftedLogic folds after type legalization ClosedPublic Authored by RKSimon on Oct 16 2022, 10:56 AM.
Details Summary This was disabled to prevent regressions, which appear to be just occurring on AMDGPU (at least in our current lit tests). Fixes #57872
Diff Detail
Event TimelineComment Actions Thanks. The change looks good to me from BPF perspective as it fixed the regression in https://github.com/llvm/llvm-project/issues/57872. Comment Actions
The diffs look OK to me, modulo one pretty minor regression noted inline. As for the general approach of putting the smarts in AMDGPUTargetLowering::isDesirableToCommuteWithShift: does AMDGPU have special code to match or(shl(load_zext(),c), load_zext()) and merge it into a wider load? If so, could it be improved to match the case where both loads are shifted? On the other hand, since you've already coded and tested this approach, I think it is fine.
Comment Actions Extend AMDGPUTargetLowering::isDesirableToCommuteWithShift to avoid losing SR*(SHL(X,C1),C2) patterns that can fold to BFE instructions This revision is now accepted and ready to land.Oct 27 2022, 10:48 PM This revision was landed with ongoing or failed builds.Oct 29 2022, 4:30 AM Closed by commit rG78739fdb4d84: [DAG] Enable combineShiftOfShiftedLogic folds after type legalization (authored by RKSimon). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 468922 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
llvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll
llvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll
llvm/test/CodeGen/AMDGPU/idot8s.ll
llvm/test/CodeGen/AMDGPU/idot8u.ll
llvm/test/CodeGen/AMDGPU/insert_vector_dynelt.ll
llvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
llvm/test/CodeGen/BPF/pr57872.ll
llvm/test/CodeGen/Mips/cconv/return-struct.ll
llvm/test/CodeGen/Mips/cconv/vector.ll
llvm/test/CodeGen/Mips/load-store-left-right.ll
llvm/test/CodeGen/Mips/unalignedload.ll
llvm/test/CodeGen/RISCV/bswap-bitreverse.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-unaligned.ll
llvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll
llvm/test/CodeGen/RISCV/unaligned-load-store.ll
llvm/test/CodeGen/SystemZ/store_nonbytesized_vecs.ll
llvm/test/CodeGen/Thumb/urem-seteq-illegal-types.ll
llvm/test/CodeGen/X86/bool-vector.ll
llvm/test/CodeGen/X86/combine-bitreverse.ll
llvm/test/CodeGen/X86/is_fpclass.ll
llvm/test/CodeGen/X86/vector-sext.ll
|