[PATCH] D88475: [InstCombine] visitTrunc - trunc (lshr (sext A), C) --> (ashr A, C) non-uniform support
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 04:32:39 PDT 2020
lebedev.ri added a comment.
I think this should look closer to: (precommit that before this patch)
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:830-855
+ Constant *C;
+ if (match(Src, m_LShr(m_SExt(m_Value(A)), m_Constant(C)))) {
unsigned AWidth = A->getType()->getScalarSizeInBits();
unsigned MaxShiftAmt = SrcWidth - std::max(DestWidth, AWidth);
// If the shift is small enough, all zero bits created by the shift are
// removed by the trunc.
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88475/new/
https://reviews.llvm.org/D88475
More information about the llvm-commits
mailing list