[PATCH] D151934: InstCombine: Recognize fneg when performed as bitcasted integer

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 15:57:20 PDT 2023


arsenm added a comment.

In D151934#4632790 <https://reviews.llvm.org/D151934#4632790>, @goldstein.w.n wrote:

> Depends which context you are talking about. If its with other float instructions sure. If its with integer instructions I'm not so sure.
> Thats why I think it should be `(bitcast (xor (bitcast))` not just `(xor (bitcast))`.
>
> Edit: Although it could go either way, so no real strong opposition.

Canonical form tends to push things into sources, not the other direction. If the integer operation was useful downstream it should have folded before reaching here


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151934/new/

https://reviews.llvm.org/D151934



More information about the llvm-commits mailing list