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

Steve Canon via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 28 17:57:36 PST 2015


scanon added a comment.

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


You'd use VFNMSUB instead to avoid needing to conjure -0.  However, that still does the wrong thing in non-default rounding modes.  Consider -(0*-1) in round-down.  This should produce +0.  Instead, we get -0 - (-1*0) = -0.

So this could be licensed under no-signed-zeros, or also under assume-default-rounding (proposed in http://reviews.llvm.org/D14067).


Repository:
  rL LLVM

http://reviews.llvm.org/D14909





More information about the llvm-commits mailing list