Recognize n/1 in the SCEV divide function
authorBrendon Cahoon <bcahoon@codeaurora.org>
Mon, 20 Apr 2015 16:03:28 +0000 (16:03 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Mon, 20 Apr 2015 16:03:28 +0000 (16:03 +0000)
commitd9b36e100749c6a0d46a3882cb98941314dc109e
tree29e234605fc6b500fc7b99bf32628e5ef0ac7eb0
parent70273be423466dd36c8366c855dd4cad4a13bb4b
Recognize n/1 in the SCEV divide function

n/1 generates a quotient equal to n and a remainder of 0.
If this case is not recognized, then the SCEV divide() function
can return a remainder that is greater than or equal to the
denominator, which means the delinearized subscripts for the
test case will be incorrect.

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

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