[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 14:06:19 PDT 2018


cameron.mcinally added a comment.

In https://reviews.llvm.org/D53205#1267982, @cameron.mcinally wrote:

> Also, it will be ugly to compensate for this shortcoming at the caller.


Modifying the callers could look like this:

  if(I->hasNoSignedZeros() ?
        match(I, m_FNegNSZ(m_Value())) :
        match(I, m_FNeg(m_Value()))) 

It's not pretty. Also, we have to ensure that Instruction I is an FPMathOperator, so it gets uglier without context...


Repository:
  rL LLVM

https://reviews.llvm.org/D53205





More information about the llvm-commits mailing list