[PATCH] D53205: [FPEnv][NFCI] Convert more BinaryOperator::isFNeg(...) to m_FNeg(...)

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 17 12:42:27 PDT 2018


cameron.mcinally added a comment.

Ah, yeah, there is a silent regression here. From BinaryOperator::isFNeg(...):

if (!IgnoreZeroSign)

  IgnoreZeroSign = cast<Instruction>(V)->hasNoSignedZeros();

So that code is checking the NoSignedZero FastMath flag and then ignoring the sign on a zero if found.

We currently don't have that capability with the PatternMatcher functions. Those functions are fairly rigid too, so it won't be easy to add that capability. Also, it will be ugly to compensate for this shortcoming at the caller.

Any suggestions on how to proceed?


Repository:
  rL LLVM

https://reviews.llvm.org/D53205





More information about the llvm-commits mailing list