[llvm] InstCombine: fix transformation of bitwiseAnd to fabs (PR #71257)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 01:16:08 PST 2023


nikic wrote:

> Could you please provide references of this universal definition that `fabs` only changed the sign bit?

Quoting from LangRef (https://llvm.org/docs/LangRef.html#llvm-fabs-intrinsic):

> This function returns the same values as the libm fabs functions would, and handles error conditions in the same way. The returned value is completely identical to the input except for the sign bit; in particular, if the input is a NaN, then the quiet/signaling bit and payload are perfectly preserved.

https://github.com/llvm/llvm-project/pull/71257


More information about the llvm-commits mailing list