[PATCH] D74066: [ValueTracking] usub(a, b) cannot overflow if a >= b.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 09:09:25 PST 2020
fhahn created this revision.
fhahn added reviewers: nikic, RKSimon, lebedev.ri, spatel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
If we know that a >= b (unsigned), usub.with.overflow(a, b) cannot
overflow. Similarly, if b > a, the same expression overflows.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74066
Files:
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstCombine/usub-overflow-known-by-implied-cond.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74066.242649.patch
Type: text/x-patch
Size: 6157 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/3dd8da3b/attachment.bin>
More information about the llvm-commits
mailing list