[llvm-dev] Condition code in DAGCombiner::visitFADDForFMACombine?

Ryan Taylor via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 23 08:07:29 PDT 2018


Nicolai,

  I don't think that's the correct  change either but I wanted to get a
quick summary of potential failures. You're right it's not entirely
dependent on 'contract' or 'reassoc' when the global flag is set, ie
-fp-contract=fast, as in your X86 example, this is essentially setting
'contract' on every instruction.

 I think it would be add a 'nocontract' fast math flag. The issue is that
when -fp-contract=fast is set and there isn't a 'contract' or 'reassoc' on
an instruction, how do you not contract it and still contract other
instructions that also don't have the 'contract' or 'reassoc' set when
-fp-contract is present.

-Ryan







On Thu, Aug 23, 2018 at 10:47 AM Nicolai Hähnle <nhaehnle at gmail.com> wrote:

> On 22.08.2018 23:53, Ryan Taylor wrote:
> > Just a quick change of isContractableFMUL to isContractable gives about
> > 49 unexpected failures.
>
> That may not be the right change to be looking at. Consider:
>
> >      LLVM :: CodeGen/X86/fma_patterns.ll
>
> This file doesn't use any `contract` or `reassoc` flags on IR instructions.
>
> I don't know what's changed there, but the point is that the test does
> not depend on the exact semantics of `contract` and `reassoc`.
>
> Cheers,
> Nicolai
>
> --
> Lerne, wie die Welt wirklich ist,
> Aber vergiss niemals, wie sie sein sollte.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180823/eef8c7c1/attachment.html>


More information about the llvm-dev mailing list