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

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 19:22:33 PDT 2017


etherzhhb created this revision.

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 https://reviews.llvm.org/D34598


Repository:
  rL LLVM

https://reviews.llvm.org/D38072

Files:
  lib/Transforms/Utils/SimplifyIndVar.cpp
  test/Transforms/IndVarSimplify/replace-srem-by-urem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38072.115954.patch
Type: text/x-patch
Size: 7380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170920/22fd3f3b/attachment.bin>


More information about the llvm-commits mailing list