[PATCH] D69842: [InstCombine] canonicalize shift+logic+shift to reduce dependency chain
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 10:09:07 PST 2019
spatel marked an inline comment as done.
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:321
+ auto matchFirstShift = [&](Value *V) {
+ return match(V, m_OneUse(m_Shift(m_Value(X), m_APInt(C0)))) &&
+ cast<BinaryOperator>(V)->getOpcode() == ShiftOpcode &&
----------------
lebedev.ri wrote:
> This innermost shift only has to be one-use iff `Y` is not constant.
Good point - I'll make it a TODO for this patch, and we can follow-up with an enhancement.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69842/new/
https://reviews.llvm.org/D69842
More information about the llvm-commits
mailing list