[PATCH] D50913: [FPEnv] Don't need copysign/fabs/fneg constrained intrinsics

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 14:29:29 PDT 2018


cameron.mcinally added a comment.

> The fsub semantics says that it cannot trap, so this would still be fine -- as long as we're sure the -0-x is always implemented via a dedicated negate instruction, and never via a subtraction.

Oh, that can't be correct. Can you point me to the documentation?

An FSUB can trap. Also, the user could explicitly write 0-x or -x, depending on what behavior they want. It's not safe for the compiler to canonicalize both of those into one operation. Unless I'm missing something?

I do see that you wrote -0-x. Is there something special about the -0?


Repository:
  rL LLVM

https://reviews.llvm.org/D50913





More information about the llvm-commits mailing list