[PATCH] D114844: [X86][FP16] Only generate approximate rsqrt when Reciprocal is true for half type

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 05:08:56 PST 2021


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:23243
       Subtarget.hasFP16()) {
+    assert(Reciprocal && "Don't replace SQRT with RSQRT for half type");
     if (RefinementSteps == ReciprocalEstimate::Unspecified)
----------------
RKSimon wrote:
> Do we have test coverage for this path? A quick grep didn't find anything other than the intrinsics test files.
We have many tests in both changed files to cover the path, e.g. `test_sqrt_ph_512_fast`
You can't find elsewhere simply because this path is for `f16` only and we don't have the support prior to FP16 enabling.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114844



More information about the llvm-commits mailing list