[PATCH] D122010: [InstCombine] try to canonicalize logical shift after bswap
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 14:57:22 PDT 2022
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: StephenFan.
LGTM with one (optional) minor
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1360
+ if (match(BO, m_LogicalShift(m_Value(X), m_APIntAllowUndef(C))) &&
+ (*C & 7) == 0) {
+ Value *NewSwap = Builder.CreateUnaryIntrinsic(Intrinsic::bswap, X);
----------------
Worth using KnownBits to allow non-uniform shift amounts?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122010/new/
https://reviews.llvm.org/D122010
More information about the llvm-commits
mailing list