[PATCH] SelectionDAG: fold (fp_to_u/sint (u/sint_to_fp val)) when possible
Quentin Colombet
qcolombet at apple.com
Mon Feb 9 13:10:07 PST 2015
On Feb 9, 2015, at 1:01 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>>
>> 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> wrote:
>>>
>>>
>>> On Mon, Feb 9, 2015 at 11:30 AM, Fiona Glaser <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?
InstCombine is a canonicalization, target independent pass.
DAG can still do some target independent things but it also uses target dependent information.
>
> 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.
I agree. That is also what I meant in my initial message.
Cheers,
Q.
>
> —
> Mehdi
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/9c7e97b3/attachment.html>
More information about the llvm-commits
mailing list