[PATCH] D155389: [ValueTracking][ScalarEvolution] improving llvm.assume's support for the argument value without context & reducing the result range of ScalarEvolution::getRange using computeConstantRange
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 15:27:21 PDT 2023
goldstein.w.n added a comment.
In D155389#4545120 <https://reviews.llvm.org/D155389#4545120>, @nikic wrote:
> Please see D93974 <https://reviews.llvm.org/D93974>, D97077 <https://reviews.llvm.org/D97077>, D97099 <https://reviews.llvm.org/D97099> and D97092 <https://reviews.llvm.org/D97092> for existing attempts to tackle this problem. In particular, you'll want to read the discussion on the last one of these.
IIUC the fundemental issue in D97092 <https://reviews.llvm.org/D97092> is there is no way to guarantee the assume won't be used to influence the condition actually being assumed. But if the scope of the change is limited to arguments, which have no dependencies that can be modified, isn't that concern voided. I get that that makes it so that we can literally make this work for `i1` arguments, but maybe there is a separate way forward that protects `assume(condition(arg))`. Probably too big a hammer, but something like the lines of `@llvm.icmp.<pred>.assume(lhs, rhs)` seems like it would allow for assumes on arguments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155389/new/
https://reviews.llvm.org/D155389
More information about the llvm-commits
mailing list