[PATCH] D122010: [InstCombine] try to canonicalize logical shift after bswap
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 05:57:28 PDT 2022
spatel marked an inline comment as done.
spatel added inline comments.
================
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);
----------------
RKSimon wrote:
> Worth using KnownBits to allow non-uniform shift amounts?
I'll put a TODO comment on it. I haven't seen a motivating case for variable or non-splat shifts yet.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122010/new/
https://reviews.llvm.org/D122010
More information about the llvm-commits
mailing list