[PATCH] D152927: [InstCombine] Fold binop op shifts with related amounts
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 08:32:32 PDT 2023
nikic created this revision.
nikic added reviewers: goldstein.w.n, RKSimon.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fold
binop(shift(ShiftedC1, ShAmt), shift(ShiftedC2, add(ShAmt, AddC)))
->
shift(binop(ShiftedC1, shift(ShiftedC2, AddC)), ShAmt)
where both shifts are the same and AddC is a valid shift amount.
https://reviews.llvm.org/D152927
Files:
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/binop-of-displaced-shifts.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152927.531352.patch
Type: text/x-patch
Size: 10783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230614/457c37dc/attachment.bin>
More information about the llvm-commits
mailing list