[PATCH] D116811: [SCEVExpander] Skip creating <u 0 check, which is always false.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 07:23:53 PST 2022
fhahn created this revision.
fhahn added reviewers: reames, nikic, lebedev.ri, mkazantsev.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.
Unsigned compares of the form <u 0 are always false. Do not create such
a redundant check in generateOverflowCheck.
The patch introduces a new lambda to create the check, so we can
exit early conveniently and skip creating some instructions feeding the
check.
I am planning to sink a few additional instructions as follow-ups, but I
would prefer to do this separately, to keep the changes and diff
smaller.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116811
Files:
llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
llvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
llvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
llvm/test/Transforms/LoopVersioning/wrapping-pointer-versioning.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116811.398139.patch
Type: text/x-patch
Size: 10815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220107/ee5ec21c/attachment.bin>
More information about the llvm-commits
mailing list