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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 02:26:04 PST 2024


arsenm wrote:

> > 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
> 
> Does this mean the matcher should be checking for FMafn flags or check that the function has UnsafeFPMath?

Neither. It would be a question of checking the parent function's denormal mode (could maybe consider unsafe flags, but none are an exact match). I think we need to loosen the DAG code, and this is fine (for non-strictfp functions, in which case this would be G_STRICT_FMUL so this wouldn't fire anyway) 

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


More information about the llvm-commits mailing list