[SCEV] Mark AddExprs as nsw or nuw if legal
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 22 Oct 2015 19:57:19 +0000 (19:57 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 22 Oct 2015 19:57:19 +0000 (19:57 +0000)
commitc05a5c2c864cd22f86b71f9815f9b83798cf543b
treeccfefb0868af26aaa817270123939fceea7059d3
parentbf8252829fe330fe62fd46e642009f11d3e22a21
[SCEV] Mark AddExprs as nsw or nuw if legal

Summary:
This uses `ScalarEvolution::getRange` and not potentially control
dependent `nsw` and `nuw` bits on the arithmetic instruction.

Reviewers: atrick, hfinkel, nlewycky

Subscribers: llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D13613

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251048 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll
test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll
test/Analysis/ScalarEvolution/infer-prestart-no-wrap.ll
test/Analysis/ScalarEvolution/min-max-exprs.ll
test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll [new file with mode: 0644]
test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll