[LLVMdev] Fast-math flags in constant expressions

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Thu Nov 27 05:39:20 PST 2014


Hi,

I'm wondering why lib/AsmParser/LLParser handles fast-math flags in the
following IR:

    ...
    %val = fmul nnan double 1.0, 1.0
    ...

but doesn't allow any flags if "fmul" is inside "phi":

    ...
    %val = phi double [ fmul (double 1.0, double 1.0), %cond.true ],
                      [ fmul (double 1.0, double 1.0), %cond.false ]
    ...

LLParser::ParseValID(...) could call EatFastMathFlagsIfPresent() to
handle fast-math flags, but it doesn't.  Is this intended or a bug?

Regards,
Sergey



More information about the llvm-dev mailing list