[PATCH] D98697: [IndVars] Provide eliminateIVComparison with context

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 04:38:56 PDT 2021


mkazantsev created this revision.
mkazantsev added reviewers: lebedev.ri, nikic, reames, asbirlea.
Herald added a subscriber: hiraditya.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We can prove more predicates when we have a context when eliminating ICmp.
As first (and very obvious) approximation we can use the ICmp instruction itself,
though in the future we are going to use a common dominator of all its users.
Need some refactoring before that.


https://reviews.llvm.org/D98697

Files:
  llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
  llvm/test/Transforms/IndVarSimplify/checks_against_min_value.ll
  llvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
  llvm/test/Transforms/IndVarSimplify/scev-expander-preserve-lcssa.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98697.330941.patch
Type: text/x-patch
Size: 9992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210316/1e67d1ba/attachment.bin>


More information about the llvm-commits mailing list