[PATCH] D92207: [IndVars] ICmpInst should not prevent IV widening

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 27 00:06:51 PST 2020


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

If we decided to widen IV with zext, then unsigned comparisons
should not prevent widening (same for sext/sign comparisons).
The result of comparison in wider type does not change in this case.


https://reviews.llvm.org/D92207

Files:
  llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
  llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92207.307967.patch
Type: text/x-patch
Size: 5562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201127/d7082bbb/attachment.bin>


More information about the llvm-commits mailing list