[PATCH] D14909: [X86][FMA] Optimize FNEG(FMUL) Patterns

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 28 16:03:16 PST 2015


Could this be resolved by using -0 as the constant instead of 0 in non-fast-math mode?

—escha

> On Nov 28, 2015, at 5:52 PM, Steve Canon via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> scanon added inline comments.
> 
> ================
> Comment at: lib/Target/X86/X86ISelLowering.cpp:26157
> @@ -26141,3 +26156,3 @@
>   // instruction to include the extra negation.
>   if (Arg.hasOneUse()) {
>     switch (Arg.getOpcode()) {
> ----------------
> 0 - a*b gets the sign of zero wrong if a or b is exactly zero; the result should be -0, but +0 is returned instead in default rounding.  So this should be protected by no signed zeros.
> 
> 
> Repository:
>  rL LLVM
> 
> http://reviews.llvm.org/D14909
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list