[llvm] [GlobalISel] replace right identity X * -1.0 with fneg(x) (PR #80526)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 3 07:45:28 PST 2024


arsenm wrote:

> I don't think this is safe since fmul is an arithmetic operation that may quieten nans and flush denormals, whereas fneg is defined to just flip the sign bit.
> 
> See https://reviews.llvm.org/D109446 for the DAG equivalent.

This is OK, we are allowed to drop canonicalizes for non-strictfp functions. The DAG is too strict and I've been meaning to remove those restrictions 

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


More information about the llvm-commits mailing list