[PATCH] D103861: [Attributor] Look through selects in genericValueTraversal
Kuter Dinel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 10 16:56:24 PDT 2021
kuter added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:309
+ if (!C.hasValue() || isa_and_nonnull<UndefValue>(*C))
+ continue;
+ if (auto *CI = dyn_cast_or_null<ConstantInt>(*C)) {
----------------
`A.getAssumedConstant` returns None if the value simplification wasn't possible.
If the value is simplified but not constant it returns nullptr.
Shouldn't we visit the true and false options when there is no simplification ?
I don't understand why we `continue` here. I think callback would receive the select instruction itself.
Which is very different from previous behavior.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103861/new/
https://reviews.llvm.org/D103861
More information about the llvm-commits
mailing list