HomePhabricator

[SCEV] Guard movement of insertion point for loop-invariants

Authored by wristow on Mar 18 2019, 11:52 AM.

Description

[SCEV] Guard movement of insertion point for loop-invariants

This reinstates r347934, along with a tweak to address a problem with
PHI node ordering that that commit created (or exposed). (That commit
was reverted at r348426, due to the PHI node issue.)

Original commit message:

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/D57428

llvm-svn: 356392

Details

Committed
wristowMar 18 2019, 11:52 AM
Differential Revision
D57428: [SCEV] Guard movement of insertion point for loop-invariants (take 2)
Parents
rG270249de2bb3: [AArch64] Small fix for getIntImmCost
Branches
Unknown
Tags
Unknown