[PATCH] D82717: [InstCombine] Fold icmp with dominating assume
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 28 07:36:31 PDT 2020
nikic created this revision.
nikic added reviewers: spatel, lebedev.ri, xbolva00.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
If we `assume(x > y)`, then we should be able to fold the basic implications of that, like `x >= y`. This already happens if either one of the operands is constant (LVI) or if the conditions are exactly the same (CSE), but not we have an implication with non-constant operands. Support this by querying AssumptionCache.
Fixes https://bugs.llvm.org/show_bug.cgi?id=40149.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82717
Files:
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/assume_icmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82717.273934.patch
Type: text/x-patch
Size: 5932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200628/14661a36/attachment-0001.bin>
More information about the llvm-commits
mailing list