[SCEV] Add smin support to getRangeRef
authorPhilip Reames <listmail@philipreames.com>
Thu, 12 Sep 2019 21:32:27 +0000 (21:32 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 12 Sep 2019 21:32:27 +0000 (21:32 +0000)
commitbdf608477e9a4f5bce98b1592a968ebd9aa30285
tree05a297a207c2229eb32678ba8b936213113ab5ee
parentefe6724b9f55b0382f97577c582306b856ff1f95
[SCEV] Add smin support to getRangeRef

We were failing to compute trip counts (both exact and maximum) for any loop which involved a comparison against either an umin or smin. It looks like this simply got missed when we added smin/umin to SCEV.  (Note: umin was submitted separately earlier today.  Turned out two folks hit this at the same time.)

Differential Revision: https://reviews.llvm.org/D67514

llvm-svn: 371776
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/max-expr-cache.ll
llvm/test/Analysis/ScalarEvolution/trip-count15.ll
llvm/test/Transforms/IRCE/rc-negative-bound.ll