OSDN Git Service

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)
commitf8c4fd600578266b679856bb530a3b2774b3a2ce
tree8610cdafca5ec0a84bda8e8282ac40a3a49d5aad
parent7e44cee3e66b06a019171a093b3d19d3bb599257
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228572 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/min-max-exprs.ll [new file with mode: 0644]