[all-commits] [llvm/llvm-project] 38a44b: [CodeGenPrepare] Reverse the canonicalization of i...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Mon Mar 18 03:28:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38a44bdc93db5b00310230f6542df39017b9a41b
      https://github.com/llvm/llvm-project/commit/38a44bdc93db5b00310230f6542df39017b9a41b
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-03-18 (Mon, 18 Mar 2024)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/test/CodeGen/AArch64/isinf.ll
    M llvm/test/CodeGen/AMDGPU/fp-classify.ll
    M llvm/test/CodeGen/AMDGPU/fract-match.ll
    M llvm/test/CodeGen/PowerPC/fp-classify.ll
    A llvm/test/Transforms/CodeGenPrepare/AArch64/fpclass-test.ll
    A llvm/test/Transforms/CodeGenPrepare/RISCV/fpclass-test.ll
    A llvm/test/Transforms/CodeGenPrepare/X86/fpclass-test.ll

  Log Message:
  -----------
  [CodeGenPrepare] Reverse the canonicalization of isInf/isNanOrInf (#81572)

In commit
https://github.com/llvm/llvm-project/commit/2b582440c16c72b6b021ea5c212ceda3bdfb2b9b,
we canonicalize the isInf/isNanOrInf idiom into fabs+fcmp for better
analysis/codegen (See also the discussion in
https://github.com/llvm/llvm-project/pull/76338).

This patch reverses the fabs+fcmp to `is.fpclass`. If the `is.fpclass`
is not supported by the target, it will be expanded by TLI.

Fixes the regression introduced by
https://github.com/llvm/llvm-project/commit/2b582440c16c72b6b021ea5c212ceda3bdfb2b9b
and
https://github.com/llvm/llvm-project/pull/80414#issuecomment-1936374206.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list