[InstSimplify] fold copysign with negated operand
authorSanjay Patel <spatel@rotateright.com>
Sun, 8 Dec 2019 15:05:28 +0000 (10:05 -0500)
committerSanjay Patel <spatel@rotateright.com>
Sun, 8 Dec 2019 15:08:02 +0000 (10:08 -0500)
commit12f39e0fede92ca04c811660530e750585124ed2
tree12ec331edc3c97eb16e95a3cdb0e8fd6dd6e40b5
parentb32490270b786d2c5ba154e613ee2d5e36ed4197
[InstSimplify] fold copysign with negated operand

This is another transform suggested in PR44153:
https://bugs.llvm.org/show_bug.cgi?id=44153

The backend for some targets already manages to get
this if it converts copysign to bitwise logic.
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/call.ll