[PATCH] D124930: [DagCombine] Fold (X & ~Y) | Y with truncated not
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 4 08:45:53 PDT 2022
nikic created this revision.
nikic added reviewers: RKSimon, spatel, craig.topper.
Herald added subscribers: StephenFan, ecnelises, pengfei, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This extends the `(X & ~Y) | Y` to `X | Y` fold to also work if `~Y` is a truncated not (when taking into account the mask `X`). This is done by exporting the infrastructure added in D124856 <https://reviews.llvm.org/D124856> and reusing it here.
I've retained the old value of `AllowUndefs=false`, though probably this can be switched to true with extra test coverage.
https://reviews.llvm.org/D124930
Files:
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/add-and-not.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124930.427020.patch
Type: text/x-patch
Size: 4798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220504/cd84a7c1/attachment.bin>
More information about the llvm-commits
mailing list