[PATCH] D25913: [InstCombine] Fold nuw left-shifts in `ugt`/`ule` comparisons.

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 11:31:58 PDT 2016


spatel accepted this revision.
spatel added a comment.

In https://reviews.llvm.org/D25913#584987, @bryant wrote:

> Simplify since ICmp implies identically typed lhs + rhs.


Yes - that looks nicer. Unlike the DAG, IR has actual documentation that we can reference. :)
"Both arguments to the ‘shl‘ instruction must be the same integer or vector of integer type."
http://llvm.org/docs/LangRef.html#shl-instruction

Sorry for the earlier bogus suggestion to grab the code from the trunc fold.


Repository:
  rL LLVM

https://reviews.llvm.org/D25913





More information about the llvm-commits mailing list