[llvm-commits] [llvm] r79439 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/live-out-reg-info.ll test/CodeGen/X86/test-shrink.ll

Dan Gohman gohman at apple.com
Wed Aug 19 13:24:47 PDT 2009


On Aug 19, 2009, at 1:12 PM, Eli Friedman wrote:


> On Wed, Aug 19, 2009 at 11:16 AM, Dan Gohman<gohman at apple.com> wrote:
>
>> Author: djg
>>
>> Date: Wed Aug 19 13:16:17 2009
>>
>> New Revision: 79439
>>
>>
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=79439&view=rev
>>
>> Log:
>>
>> Add an x86 peep that narrows TEST instructions to forms that use
>>
>> a smaller encoding. These kinds of patterns are very frequent in
>>
>> sqlite3, for example.
>>
>
> Hmm... the one issue I can think of is that the way it's implemented,
> this might actually make the code worse if the operand is in memory;
> have you thought about that at all?

The DAGCombiner already shrinks loads and optionally adjusts the
addresses in order to do comparisons on smaller types.

It would be possible to do these new transforms as target-specific
DAGCombines, but handling the h-register case that way would be
awkward.

Dan




More information about the llvm-commits mailing list