This is 1 of the potential folds uncovered by extending D72521.
We don't seem to do this in the backend either (unless I'm not seeing some target-specific transform).
icc and gcc (appears to be target-specific) do this transform.
Paths
| Differential D73057
[InstCombine] fneg(X + C) --> -C - X ClosedPublic Authored by spatel on Jan 20 2020, 10:56 AM.
Details Summary This is 1 of the potential folds uncovered by extending D72521. We don't seem to do this in the backend either (unless I'm not seeing some target-specific transform). icc and gcc (appears to be target-specific) do this transform.
Diff Detail Event Timeline
This revision is now accepted and ready to land.Jan 21 2020, 8:21 AM spatel added inline comments.
Closed by commit rG0ade2abdb01f: [InstCombine] fneg(X + C) --> -C - X (authored by spatel). · Explain WhyJan 22 2020, 6:53 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 239171 llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/fneg.ll
|
Nit: are lowercase variables the standard format for tests? I see that they're uppercase in the source comments.