[PATCH] D124889: [ValueTracking] Add support to deduce a PHI node being a power of 2 if each incoming value is a power of 2.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 15:00:02 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2192
+ // Check if it is an induction variable and always power of two.
+ if (Q.IIQ.UseInstrInfo && isPowerOfTwoRecurrence(PN, OrZero, Depth, RecQ))
+ return true;
----------------
Rather than requiring `Q.IIQ.UseInstrInfo` here, it would be better to use `Q.IIQ.hasNoUnsignedWrap()` etc in the function. Presence of nowrap flags is not required for all cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124889/new/
https://reviews.llvm.org/D124889
More information about the llvm-commits
mailing list