[PATCH] D54876: [DemandedBits] Add support for funnel shifts
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 25 07:56:59 PST 2018
spatel added inline comments.
================
Comment at: lib/Analysis/DemandedBits.cpp:147
+ case Intrinsic::fshr:
+ if (auto *SA = dyn_cast<ConstantInt>(II->getOperand(2))) {
+ // Normalize to funnel shift left. APInt shifts of BitWidth are well-
----------------
Is this analysis completely ignoring vector integer instructions?
It would still be good to use 'match(X, m_APInt())' in case we ever upgrade the whole thing to handle vectors. But if the answer to the above question is 'yes', then a TODO comment is ok for now.
================
Comment at: lib/Analysis/DemandedBits.cpp:154-156
+ if (OperandNo == 0)
+ AB = AOut.lshr(ShiftAmt);
+ else if (OperandNo == 1)
----------------
Can we do something like D54478 for operand 2 in a follow-up patch?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54876/new/
https://reviews.llvm.org/D54876
More information about the llvm-commits
mailing list