Commit Graph

4 Commits

Author SHA1 Message Date
David Bolvansky 20d37fab82 [InstCombine] x /c fabs(x) -> copysign(1.0, x)
Summary:
x / fabs(x) -> copysign(1.0, x)
fabs(x) / x -> copysign(1.0, x)

Reviewers: spatel, foad, RKSimon, efriedma

Reviewed By: spatel

Subscribers: lebedev.ri, llvm-commits

Tags: #llvm

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

llvm-svn: 368570
2019-08-12 13:43:35 +00:00
David Bolvansky f6a5699392 [NFC] Added tests for D65898
llvm-svn: 368447
2019-08-09 15:52:26 +00:00
David Bolvansky ae154d00b4 [NFC] Fixed newly added tests
llvm-svn: 368201
2019-08-07 19:36:46 +00:00
David Bolvansky f8183d64de [NFC] Added tests for x/fabs(X) fold
llvm-svn: 368200
2019-08-07 19:35:25 +00:00