[PATCH] D116766: [SCEV] Poison-safe `UMin` expression
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 6 13:47:01 PST 2022
lebedev.ri created this revision.
lebedev.ri added reviewers: reames, nikic, mkazantsev, aqjune, rnk.
lebedev.ri added a project: LLVM.
Herald added a reviewer: bollu.
Herald added subscribers: javed.absar, hiraditya.
lebedev.ri requested review of this revision.
This is a very rough proof of concept.
As discussed in https://github.com/llvm/llvm-project/issues/53020 / https://reviews.llvm.org/D116692,
SCEV is forbidden from reasoning about 'backedge taken count'
if the branch condition is a poison-safe logical operation,
which is conservatively correct, but is severely limiting.
Instead, we should have a way to express poison blocking properties
that we want to preserve: https://alive2.llvm.org/ce/z/GQisut
That allows us to handle the patterns in question.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116766
Files:
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/include/llvm/Analysis/ScalarEvolutionDivision.h
llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
llvm/test/Analysis/ScalarEvolution/exit-count-select.ll
llvm/test/Transforms/IndVarSimplify/exit-count-select.ll
polly/include/polly/Support/SCEVAffinator.h
polly/lib/Support/SCEVAffinator.cpp
polly/lib/Support/SCEVValidator.cpp
polly/lib/Support/ScopHelper.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116766.397980.patch
Type: text/x-patch
Size: 42751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220106/1513feeb/attachment.bin>
More information about the llvm-commits
mailing list