[PATCH] D145143: [DAGCombiner] Add fold for `~x & x` -> `0`
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 12:29:13 PST 2023
goldstein.w.n marked an inline comment as done.
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6630
+ return Op0.getOpcode() == ISD::XOR && Op0.getOperand(0) == Op1 &&
+ isAllOnesOrAllOnesSplat(Op0.getOperand(1));
+ };
----------------
RKSimon wrote:
> Use isBitwiseNot / getBitwiseNotOperand ?
Made new helper that uses `isBitwiseNot`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145143/new/
https://reviews.llvm.org/D145143
More information about the llvm-commits
mailing list