OSDN Git Service

[SCEV] Guard movement of insertion point for loop-invariants
authorWarren Ristow <warren.ristow@sony.com>
Fri, 30 Nov 2018 00:02:54 +0000 (00:02 +0000)
committerWarren Ristow <warren.ristow@sony.com>
Fri, 30 Nov 2018 00:02:54 +0000 (00:02 +0000)
commit28ade4e6f89e51bff03a34575d85a6a3ac701d87
tree6957e5ecbd7f55e1bcd800a0b6de08640eb8e71d
parentdcd85560e11680fdd755e8bb2afa5f2d35f692cd
[SCEV] Guard movement of insertion point for loop-invariants

r320789 suppressed moving the insertion point of SCEV expressions with
dev/rem operations to the loop header in non-loop-invariant situations.
This, and similar, hoisting is also unsafe in the loop-invariant case,
since there may be a guard against a zero denominator. This is an
adjustment to the fix of r320789 to suppress the movement even in the
loop-invariant case.

This fixes PR30806.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347934 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolutionExpander.cpp
test/Transforms/LoopVectorize/pr30806.ll [new file with mode: 0644]