[PATCH] D73435: [ValueTracking] Add DemandedElts support to computeKnownBits/ComputeNumSignBits (PR36319)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 10:36:04 PST 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1729-1732
+ case Instruction::InsertElement: {
+ // If we know the element index, split the demand between the
+ // source vector and the inserted element, otherwise assume we need
+ // the original demanded vector elements and the value.
----------------
This case is really hard to follow.
This may be missing some comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1748-1749
+ Known.Zero.setAllBits();
+ if (DemandedVal)
+ computeKnownBits(Elt, Known, Depth + 1, Q);
+ // If we don't know any bits, early out.
----------------
If `Idx` is not a constant, or out-of-bounds, why do we still `computeKnownBits()` of `Elt`?
If `Idx` is in-bounds constant, why do we call `computeKnownBits()` only on `Elt`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73435/new/
https://reviews.llvm.org/D73435
More information about the llvm-commits
mailing list