HomePhabricator

[instcombine] remove fsub to fneg hacks; only emit fneg

Authored by simoll on Mar 10 2020, 8:05 AM.

Description

[instcombine] remove fsub to fneg hacks; only emit fneg

Summary: Rewrite the fsub-0.0 idiom to fneg and always emit fneg for fp
negation. This also extends the scalarization cost in instcombine for unary
operators to result in the same IR rewrites for fneg as for the idiom.

Reviewed By: cameron.mcinally

Differential Revision: https://reviews.llvm.org/D75467

Details

Committed
simollMar 10 2020, 8:57 AM
Reviewer
cameron.mcinally
Differential Revision
D75467: [instcombine] remove fsub to fneg hacks; only emit fneg
Parents
rGf7c4d796ba67: [compiler-rt] Define ElfW() macro if it's not defined
Branches
Unknown
Tags
Unknown