[all-commits] [llvm/llvm-project] 1df8ef: [SelectionDAG][X86] Support f16 in getReciprocalOp...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Feb 18 22:15:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1df8efae56b590a58123499d2bb8ffcd1f36fc40
      https://github.com/llvm/llvm-project/commit/1df8efae56b590a58123499d2bb8ffcd1f36fc40
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-02-18 (Fri, 18 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/TargetLoweringBase.cpp
    M llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll

  Log Message:
  -----------
  [SelectionDAG][X86] Support f16 in getReciprocalOpName.

If the "reciprocal-estimates" attribute is present and it doesn't
contain "all", "none", or "default", we previously crashed on f16
operations.

This patch addes an 'h' suffix' to prevent the crash.

I've added simple tests that just enable the estimate for all
vec-sqrt and one test case that explicitly tests the new 'h' suffix
to override the default steps.

There may be some frontend change needed to, but I haven't checked
that yet.

Reviewed By: pengfei

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




More information about the All-commits mailing list