Fix a type mismatch assert in SCEV division
authorBrendon Cahoon <bcahoon@codeaurora.org>
Wed, 22 Apr 2015 15:06:40 +0000 (15:06 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Wed, 22 Apr 2015 15:06:40 +0000 (15:06 +0000)
commit8b94db17a43a9d847fb088ac49bafde15ba61a6d
tree4245999730831e01d7cb15c3ca2637ffc2d167ef
parent6c347524e2bfd8dc69f4393f48c7f0c99344cb2b
Fix a type mismatch assert in SCEV division

An assert was triggered when attempting to create a new SCEV
with operands of different types in the visitAddRecExpr. In this
test case, the operand types of the numerator and denominator
are different. The SCEV division code should generate a
conservative answer when this happens.

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

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