[LLVMdev] Fast-math flags in constant expressions

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Fri Nov 28 04:56:17 PST 2014


Doesn't look like a bug, more like a limitation of constant expressions
as llvm::BinaryConstantExpr doesn't have FastMastFlags.

-- 
Sergey

On Thu, Nov 27, 2014 at 03:39:20PM +0200, Sergey Dmitrouk wrote:
> 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