[LLVMdev] combine ISD::SETCC by custom routine

Eli Friedman
Fri, 11 Dec 2009 10:03:40 -0000

On Fri, Dec 11, 2009 at 1:49 AM, ether zhhb <etherzhhb at gmail.com>
wrote:
> hi,
>
> i have a backend that want to do custom combine on SETCC nodes.
>
> but some time SETCC was combined into BR_CC before i can visit it to
> do my own combine, because DAGCombiner always do its own combine
> before custom combine. so, is there anyway to prevent it being
> combined without changing the logic of DAGCombiner?

If BR_CC isn't legal on your target, you shouldn't end up with any in
the DAG.  Otherwise, no, there isn't any way, but I don't see the
difficulty in making your custom combine work on both SETCC and BR_CC.

-Eli