On Jan 28, 2008, at 10:56 PM, Nick Lewycky wrote:

> Chris Lattner wrote:
>> +    if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
>> +      if (II->getIntrinsicID() == Intrinsic::sqrt)
>> +        return CannotBeNegativeZero(II->getOperand(1));
>
> "Unlike sqrt in libm, however, llvm.sqrt has undefined behavior for
> negative numbers (which allows for better optimization)."
>
> I think you can safely return true here.

I will clarify LangRef: llvm.sqrt is defined for -0.0.  Thanks!

-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to