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)
commita57cc8bc817f3ff7a48bfd8221562e3cc2a2bc10
tree0ceda8d4e9fcdf4f83b4cdd0feb7f10c4ced3932
parent6779075c441b49304ba27d4a7373eaa0babb94f7
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

llvm-svn: 235311
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/Delinearization/divide_by_one.ll [new file with mode: 0644]