[PATCH] D97092: [ValueTracking] Handle assumes on arguments with context instruction
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 09:31:22 PST 2021
jdoerfert added a comment.
If you move the information into the operand bundle: `llvm.assume(i1 true) ["icmp.eq"(%a, %b)] ["icmp.le"(%p, 0)]` this problem goes away, doesn't it?
If so, there is also the outline approach which has many other benefits (https://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html):
llvm.assume(i1 true) ["assertion_fn"(%a, %b, %p)]
void assertion_fn(%a, %b, %p) {
%c0 = icmp eq %a, %b
llvm.assume(%c0)
%c1 = icmp le %p, 0
llvm.assume(%c1)
// or ret `and c0, c1`
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97092/new/
https://reviews.llvm.org/D97092
More information about the llvm-commits
mailing list