[LLVMdev] possible PowerPC (32bits) backend bug

Eli Friedman eli.friedman at gmail.com
Wed Jun 17 00:02:26 PDT 2009


2009/6/16 seventh moon <suigintou_ at hotmail.com>:
> At a glance, it looks right. Line 12 is, indeed the "fnmsubs" command, so
> the pattern did work. But look at Line 9. Here we see that the "fmuls"
> also happened! In effect, this means that the fmul happens TWICE.
>
> That can't be right can it? Unfortunately, I don't have a PPC emulator,
> so I can't run the code and see if it actually works or not.
> But it does not look right to me.

I suppose it isn't ideal, but it isn't really bad: the results of both
the fmuls and the fnmsubs instructions are used.

> It is a problem, right? Is there any solution? Because I would like to
> also use multiple-IR patterns, for the backend I am working on.

You can explicitly check that there's only a single use of a node if
you want; for example, see and_su in X86InstInfo.td.

-Eli



More information about the llvm-dev mailing list