[PATCH] D144534: [InstCombine] Fold (fcmp_oeq (fabs x) +Inf) into is_fpclass(x, fcInf)

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 07:57:27 PDT 2023


arsenm added a comment.

In D144534#4146290 <https://reviews.llvm.org/D144534#4146290>, @qiucf wrote:

> In D144534#4144155 <https://reviews.llvm.org/D144534#4144155>, @arsenm wrote:
>
>> I think this is a backwards canonicalization decision and fabs + fcmp will be more broadly understood
>
> Do you think this peephole should exist in backend? For targets with hardware instruction supporting `is.fpclass`, the intrinsic is more efficient than fabs+fcmp. Or, after `__builtin_isinf_sign` producing `is.fpclass` from frontend, this will not be needed?

Yes, the backend should handle optimally lowering fcmp and is.fpclass depending on instruction availability


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144534



More information about the llvm-commits mailing list