[all-commits] [llvm/llvm-project] b5acc2: AMDGPU: Try constant fold after folding immediate
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Wed May 28 14:33:47 PDT 2025
Branch: refs/heads/users/arsenm/amdgpu/si-peephole-opt-try-constant-fold-after-imm-fold
Home: https://github.com/llvm/llvm-project
Commit: b5acc235a3ffcb2afaa7d142bf9716594f981984
https://github.com/llvm/llvm-project/commit/b5acc235a3ffcb2afaa7d142bf9716594f981984
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-05-28 (Wed, 28 May 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
M llvm/test/CodeGen/AMDGPU/bit-op-reduce-width-known-bits.ll
M llvm/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir
M llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
M llvm/test/CodeGen/AMDGPU/fold-zero-high-bits-skips-non-reg.mir
M llvm/test/CodeGen/AMDGPU/sdiv64.ll
M llvm/test/CodeGen/AMDGPU/srem64.ll
M llvm/test/CodeGen/AMDGPU/udiv64.ll
M llvm/test/CodeGen/AMDGPU/urem64.ll
Log Message:
-----------
AMDGPU: Try constant fold after folding immediate
This helps avoid some regressions in a future patch. The or 0
pattern appears in the division tests because the reduce 64-bit
bit operation to a 32-bit one with half identity value is only
implemented for constants. We could fix that by using computeKnownBits.
Additionally the pattern disappears if I optimize the IR division
expansion, so that IR should probably be emitted more optimally in
the first place.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list