[llvm] [DAGCombiner] Only fold shift+mask compare to rotate if the shift amount divides the bit width (PR #220743)
Stanislav Bardyuk via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 04:43:54 PDT 2026
================
@@ -14980,7 +14980,7 @@ SDValue DAGCombiner::visitSETCC(SDNode *N) {
// If C0 is a mask or shifted mask and the shift amt (C1) isolates the
// remaining bits (i.e something like `(x64 & UINT32_MAX) == (x64 >> 32)`)
// Then:
- // If C1 is a power of 2, then the rotate and shift+and versions are
+ // If C1 divides the bit width, then the rotate and shift+and versions are
// equivilent, so we can interchange them depending on target preference.
----------------
kodlan wrote:
done
https://github.com/llvm/llvm-project/pull/220743
More information about the llvm-commits
mailing list