[LLVMdev] folding x * 0 = 0

Van Dijck, Tom tvandijck at ea.com
Wed Mar 3 09:25:15 PST 2010


Nope, any multiply with q.nan results in q.nan, no matter what the other arguments value is.

So '0 * q.nan == q.nan', and not 0.


-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of me22
Sent: Wednesday, March 03, 2010 9:18 AM
To: Jochen Wilhelmy
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] folding x * 0 = 0

On 3 March 2010 11:56, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote:
>
> the sin and cos calls are folded, but not the mul by zero.
>

Is x*0 => 0 true if isnan(x)?

And cos(x)*sin(x) makes me desperately want to fold it to sin(2*x)/2,
but I suppose that's not allowed either.
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list