[PATCH] D13686: [SCEV] Teach SCEV some axioms about non-wrapping arithmetic

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 21:29:32 PDT 2015


sanjoy created this revision.
sanjoy added reviewers: atrick, hfinkel, reames, nlewycky.
sanjoy added a subscriber: llvm-commits.
Herald added a subscriber: sanjoy.

 - A s<  (A + C)<nsw> if C >  0
 - A s<= (A + C)<nsw> if C >= 0
 - (A + C)<nsw> s<  A if C <  0
 - (A + C)<nsw> s<= A if C <= 0

Right now `C` needs to be a constant, but we can later generalize it to
be a non-constant if needed.

http://reviews.llvm.org/D13686

Files:
  include/llvm/Analysis/ScalarEvolution.h
  lib/Analysis/ScalarEvolution.cpp
  test/Transforms/IndVarSimplify/eliminate-comparison.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13686.37212.patch
Type: text/x-patch
Size: 4942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151013/193b22b8/attachment.bin>


More information about the llvm-commits mailing list