Allow ScalarEvolution to catch more min/max cases
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>
Mon, 9 Feb 2015 12:34:23 +0000 (12:34 +0000)
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>
Mon, 9 Feb 2015 12:34:23 +0000 (12:34 +0000)
commit2683e5676c22a6c545759afdfbd77190f42b658a
tree63579cd7d65a90112cb8599f299391a980190e07
parenteb0ad45f3f8f16dbcf91ccf1466389d69643f48e
Allow ScalarEvolution to catch more min/max cases

  For the attached test case different types are used in the ICmpInst
  and SelectInst that represent the min/max expressions. However, if the
  ICmpInst type is smaller a comparison with the sign/zero extended
  operands would have yielded the same result. This situation might
  arise after the instruction combination pass was applied.

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

llvm-svn: 228572
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/min-max-exprs.ll [new file with mode: 0644]