[llvm-commits] [llvm] r107565 - /llvm/trunk/lib/Target/README.txt

Eli Friedman eli.friedman at gmail.com
Sat Jul 3 08:33:36 PDT 2010


On Sat, Jul 3, 2010 at 2:39 AM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
>> +The movl+movl+btq+jb could be simplified to a cmpl+jne.
> This sounds like a missed DAG combiner opportunity: switch lowering
> produces 'and' with a mask and then jump if the result is not zero.
> When the mask is 2^N-1 -2^M this should be simplified as stated.

The DAG combiner doesn't have the sort of knowledge necessary: the
optimization is only safe because of the earlier branch.  In
isolation, the btq branches one way if EDI is 0, 1, 2, 3, or 5, and
the other way if it is some other number less than 64.

-Eli



More information about the llvm-commits mailing list