[llvm-commits] [llvm] r61424 - in /llvm/trunk/lib/Target/X86: X86Instr64bit.td X86InstrInfo.td

Chris Lattner clattner at apple.com
Wed Dec 24 21:32:29 PST 2008


On Dec 24, 2008, at 9:21 PM, Eli Friedman wrote:
>>> Also, even ignoring that, performance is hugely different: on a Core
>>> 2, "bt %ebx, %eax" is one uop, but "bt %ebx, (%esp)" is 10 uops.   
>>> The
>>> difference isn't quite as severe on other processors, but the reg- 
>>> reg
>>> form is still significantly faster even if a load from memory is
>>> necessary.
>>
>> Are you sure you aren't thinking of btc/bts?  bt doesn't modify any
>> operands.
>
> Oh, oops, s/modifies/tests/.  The rest is correct.

Do you have a benchmark to show this?  If it shows that it is slower  
in practice, I think it would make sense to have a "has slow bt from  
memory" subtarget flag that would be a nice predicate for the memory  
form of the instructions.

-Chris



More information about the llvm-commits mailing list