[llvm-commits] [llvm] r103881 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/mul_const.ll

Evan Cheng evan.cheng at apple.com
Sat May 15 20:51:11 PDT 2010


On May 15, 2010, at 5:36 PM, Jakob Stoklund Olesen wrote:

> 
> On May 15, 2010, at 4:37 PM, Evan Cheng wrote:
> 
>> Hi Anton, 
>> 
>> Please move it to general dag combiner for all power of two cases. Special casing for 3, 5, 7, 9 is fairly ugly. Jakob, I think you have a dag combine patch for this? It wasn't profitable for x86, but perhaps it's good for other targets.
> 
> Nope, I have an X86 patch. Many factors involve LEA, and it is not easy to imagine a target independent algorithm.
> 
> AMD has suggested instruction sequences for factors 2-31 in ยง8.2:
> http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF
> 
> A lot of them are shl+add and shl+sub which could be target independent, I guess. All of the power-of-two's are straight shl's, except for 2 which is better done with an add.

I am talking about power-of-two's ones. There is no good reason for these to be target dependent?

Evan

> 
> /jakob
> 
> 
> 





More information about the llvm-commits mailing list