[llvm-commits] [llvm] r129545 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp test/Transforms/InstCombine/or.ll

Frits van Bommel fvbommel at gmail.com
Thu Apr 14 16:11:39 PDT 2011


On Fri, Apr 15, 2011 at 12:41 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Add an instcombine for constructs like a | -(b != c); a select is more
> canonical, and generally leads to better code.  Found while looking at
> an article about saturating arithmetic.

You can also do '-cond & x' --> 'cond ? x : 0'.




More information about the llvm-commits mailing list