[LLVMdev] Why change "sub x, 5" to "add x, -5" ?

Frédéric Heitzmann frederic.heitzmann at gmail.com
Fri Jul 10 08:56:56 PDT 2015


2015-07-10 16:53 GMT+02:00 escha <escha at apple.com>:

>
> If you write a target-specific combine that conflicts with a
> canonicalization, it’ll infinite loop because it’ll oscillate between the
> two forms.
>
>
I saw that ;-)
However, I used DAGCombinerInfo::CombineTo(oldNode, newNode, false) to
prevent DAGCombiner to add the returned SDValue to worklist and recombine
it back to the canical form.
Did I miss the purpose of CombineTo ?

fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150710/071e54c0/attachment.html>


More information about the llvm-dev mailing list