[PATCH] D47928: [SimplifyIndVars] Eliminate redundant truncs

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 20:05:20 PDT 2018


mkazantsev planned changes to this revision.
mkazantsev added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:514
+          HasSignedComparisonUser = true;
+        else
+          HasUnsignedComparisonUser = true;
----------------
mkazantsev wrote:
> reames wrote:
> > This appears to be treating eq/ne as unsigned?  Is that intentional?  If so, probably worth a comment.
> Yes it is, we prefer `zext` over `sext` for canonicalization needs in case if there is no difference, as well as we prefer unsigned comparison over signed.
We can be smarter here.


https://reviews.llvm.org/D47928





More information about the llvm-commits mailing list