HomePhabricator

[SimplifyIndvar] Replace the srem used by IV if we can prove both of its…

Authored by etherzhhb on Sep 25 2017, 10:39 AM.

Description

[SimplifyIndvar] Replace the srem used by IV if we can prove both of its operands are non-negative

Since now SCEV can handle 'urem', an 'urem' is a better canonical form than an 'srem' because it has well-defined behavior

This is a follow up of D34598

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

llvm-svn: 314125