[llvm] r182499 - This is an update to a previous commit (r181216).

Evan Cheng evan.cheng at apple.com
Wed May 22 22:42:56 PDT 2013


I see your point but I don't completely agree for the following reasons. 

1. It doesn't appear canonicalizing these expressions enable further optimization.
2. Before Jean-Luc's first patch, they were not canonicalized to selects. 
3. No in tree targets would benefit from the canonicalization. 

So to me, specializing the original transformation to match only a specific idiom seems reasonable to me.

If I had understood, please let me know. 

Evan

Sent from my iPad

On May 22, 2013, at 9:18 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

> On 22 May 2013 16:29, Jean-Luc Duprat <jduprat at apple.com> wrote:
>> I agree that the select is a more natural canonical form, and I was initially convinced that this was the way to go.
>> But none of the platforms with an FMA actually benefit from seeing this in the select form; in general, floating-point multiplies are likely better optimized than floating point selects anyways.
>> 
>> It seems that we'd have to fix each and every platform to undo this particular instcombine, so it is probably better to just do it as a target specific optimization where it truly is the better choice.  This just seems to be the better compromise here.
> 
> OK, so instcombine should do the opposite transformation: convert a
> select to a uitofp and a multiplication.
> 
>> JL
> 
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list