The fmul is a canonicalizing operation, and fneg is not so this would
break denormals that need flushing and also would not quiet signaling
nans.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I think we can fold (fmul X, -1.0) -> (fsub -0.0, X) unconditionally; at least, Alive2 is happy with it. If we can do that, we can just let the existing fsub code figure out the rest. Does that sound like a plan?
Comment Actions
That works (although is a code size regression for AMDGPU). We have other combines like this that we have to undo later for this reason anyway
clang-format: please reformat the code