]> granicus.if.org Git - llvm/commit
[SCEV] Simplify umin/max of zext and sext of the same value
authorPhilip Reames <listmail@philipreames.com>
Sat, 19 Oct 2019 17:23:02 +0000 (17:23 +0000)
committerPhilip Reames <listmail@philipreames.com>
Sat, 19 Oct 2019 17:23:02 +0000 (17:23 +0000)
commitc6240320003b308f1ed304f5d656ede5a0748bd0
tree166a77d72a6ea12790329df9125dbcd4c07f57fa
parentf7d6a8bc694dc2b96d5b2625b40f32e7ed444b4f
[SCEV] Simplify umin/max of zext and sext of the same value

This is a common idiom which arises after induction variables are widened, and we have two or more exit conditions.  Interestingly, we don't have instcombine or instsimplify support for this either.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375349 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/max-trip-count-address-space.ll
test/Analysis/ScalarEvolution/max-trip-count.ll
test/Analysis/ScalarEvolution/sext-mul.ll
test/Analysis/ScalarEvolution/umin-umax-folds.ll