[PATCH] SelectionDAG: fold (fp_to_u/sint (u/sint_to_fp val)) when possible

Mehdi Amini mehdi.amini at apple.com
Mon Feb 9 13:01:39 PST 2015


> On Feb 9, 2015, at 11:48 AM, Fiona Glaser <fglaser at apple.com> wrote:
> 
> 
>> On Feb 9, 2015, at 11:31 AM, Chandler Carruth <chandlerc at google.com <mailto:chandlerc at google.com>> wrote:
>> 
>> 
>> On Mon, Feb 9, 2015 at 11:30 AM, Fiona Glaser <fglaser at apple.com <mailto:fglaser at apple.com>> wrote:
>> I get the message ;-) Already redoing it in instcombine; turns out there’s actually already code for it, but it only triggers when TypeA == TypeB. Will have a patch in a few moments.
>> 
>> Oh, sorry, I just totally missed Duncan's email. Sorry for the noise!
> 
> No problem, thanks for the suggestion. I will eventually figure out the intuition for whether a fold belongs in Instcombine or DAG!
> 
> Here’s a new patch that works in instcombine instead.


Are there some guidelines to find out what should be done only in InstCombine and not in the DAG?

Target-specific expansion or combine can end-up with this situation when it was not catched by ints-combine.

So I believe we want it to be done *both* in inst-combine *and* in the DAG.

— 
Mehdi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/4997f375/attachment.html>


More information about the llvm-commits mailing list