[PATCH] DAGCombiner: Continue combining if FoldConstantArithmetic() fails.
Matthias Braun
matze at braunis.de
Mon Jan 19 16:19:48 PST 2015
I don't know why, but phabricator did not send out an email with the new patch version and comment. Doing this manually now, consider this a ping:
Simplified patch by using condition variables.
Greetings
Matthias
> On Jan 13, 2015, at 9:14 AM, Matthias Braun <matze at braunis.de> wrote:
>
>>
>> On Jan 12, 2015, at 8:02 PM, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:
>>
>> ================
>> Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1572
>> @@ +1571,3 @@
>> + if (N0C && N1C) {
>> + SDValue Folded = DAG.FoldConstantArithmetic(ISD::ADD, VT, N0C, N1C);
>> + if (Folded.getNode())
>> ----------------
>> How about:
>>
>> if (SDValue Folded = ...)
>> return Folded;
>>
>> Or going further, you could remove the N0C && N1C check, since FoldConstantArithmetic also does it (a sliver more wasteful though).
>
> unfortunately
> if ((SDValue Folded = ...).getNode())
> return Folded;
> would be necessary and is not valid C++.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <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/20150119/82f71d98/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6946.diff
Type: application/octet-stream
Size: 5573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150119/82f71d98/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150119/82f71d98/attachment-0001.html>
More information about the llvm-commits
mailing list