[PATCH] D152876: [InstCombine] Expand `foldBinOpShiftWithShift` to handle multiple binops
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 18:27:55 PDT 2023
goldstein.w.n created this revision.
goldstein.w.n added reviewers: nikic, RKSimon.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Previously we only did folds if had only had two total binops, but the
concept can be applied arbitrarily. The only thing that changes is
some shortcuts we made in the two total binop case with `and` are no
longer applicable.
This further helps with: D151807 <https://reviews.llvm.org/D151807>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152876
Files:
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/and-xor-or.ll
llvm/test/Transforms/InstCombine/binop-and-shifts.ll
llvm/test/Transforms/InstCombine/or-shifted-masks.ll
llvm/test/Transforms/PhaseOrdering/SystemZ/sub-xor.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152876.531136.patch
Type: text/x-patch
Size: 38378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230614/63aa9e73/attachment.bin>
More information about the llvm-commits
mailing list