Issue 233341
Summary [PatternMatch] `m_FNeg` matches `fsub -0.0, x`
Labels new issue
Assignees
Reporter s-mv
    `m_FNeg` in [`PatternMatch.h`](https://github.com/llvm/llvm-project/tree/main/llvm/include/llvm/IR/PatternMatch.h) matches more than just explicit `fneg` instructions. For example it matches `fsub -0.0, x` and equivalent instructions like `fsub nsz +0.0, x`.

This is problematic as it could lead to spurious inferences as `fneg` simply flips the sign bit while subtraction from zero could have different semantics dependent on how we're handling denormals and zero.

So ideally `m_FNeg` should only match `fneg` instructions.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to