[LLVMdev] combine ISD::SETCC by custom routine

Eli Friedman eli.friedman at gmail.com
Fri Dec 11 09:24:33 PST 2009


On Fri, Dec 11, 2009 at 3:51 AM, ether zhhb <etherzhhb at gmail.com> wrote:
> hi Eli,
>
> thanks for reply :)
>
> i am currently decompose the BR_CC node to a target SETCC node and a
> target BRCOND node, but since BR_CC node sometimes is combine from a
> BRCOND node and SETCC node, so i just wondering if theres any better
> way :)

If your target doesn't need BR_CC, just mark it as "Expand" and the
DAGCombiner will avoid generating them; it looks something like the
following:

  setOperationAction(ISD::BR_CC,             MVT::Other, Expand);

-Eli



More information about the llvm-dev mailing list