[SCEV] Enhance SCEVFindUnsafe for division
authorMax Kazantsev <max.kazantsev@azul.com>
Wed, 25 Oct 2017 11:07:43 +0000 (11:07 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Wed, 25 Oct 2017 11:07:43 +0000 (11:07 +0000)
commitb6d40067af8ef18117d94c889e01824376a441c3
treef45124b4df384bb869847e0abf551f2b1f572601
parent0c7cd071f7916a4f9a0bdc70a58b8477c3700e38
[SCEV] Enhance SCEVFindUnsafe for division

This patch allows SCEVFindUnsafe algorithm to tread division by any non-positive
value as safe. Previously, it could only recognize non-zero constants.

Differential Revision: https://reviews.llvm.org/D39228

llvm-svn: 316568
llvm/lib/Analysis/ScalarEvolutionExpander.cpp
llvm/test/Transforms/IndVarSimplify/udiv.ll