[PATCH] D63112: Generalize icmp matching in IndVars' eliminateTrunc

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 17:48:04 PDT 2019


reames created this revision.
reames added reviewers: f00kat, apilipenko.
Herald added subscribers: sanjoy, bollu, mcrosier.
Herald added a project: LLVM.

We were only matching RHS being a loop invariant value, not the inverse.  Since there's nothing which appears to canonicalize loop invariant values to RHS, this means we missed cases.

Note: There's partial overlap between this transform and LFTR.  That may worthy some deeper thinking, but for the moment, let's leave the design as is, and just make it work properly.


Repository:
  rL LLVM

https://reviews.llvm.org/D63112

Files:
  lib/Transforms/Utils/SimplifyIndVar.cpp
  test/Transforms/IndVarSimplify/eliminate-trunc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63112.203946.patch
Type: text/x-patch
Size: 5923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190611/8a52fb88/attachment.bin>


More information about the llvm-commits mailing list