[llvm] 0d59a54 - Revert "[SelectionDAG][X86] Support f16 in getReciprocalOpName."

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 18 15:40:18 PST 2022


Author: Craig Topper
Date: 2022-02-18T15:39:50-08:00
New Revision: 0d59a54cea2875b38c420947897457506a150960

URL: https://github.com/llvm/llvm-project/commit/0d59a54cea2875b38c420947897457506a150960
DIFF: https://github.com/llvm/llvm-project/commit/0d59a54cea2875b38c420947897457506a150960.diff

LOG: Revert "[SelectionDAG][X86] Support f16 in getReciprocalOpName."

This reverts commit 86b5e256628ae49193ad9962626a73bafeda2883.

This wasn't supposed to be commited yet

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetLoweringBase.cpp
    llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 700c11a66904f..3a7e82c9038c1 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -2072,11 +2072,9 @@ static std::string getReciprocalOpName(bool IsSqrt, EVT VT) {
 
   Name += IsSqrt ? "sqrt" : "div";
 
-  // TODO: Handle other float types?
+  // TODO: Handle "half" or other float types?
   if (VT.getScalarType() == MVT::f64) {
     Name += "d";
-  } else if (VT.getScalarType() == MVT::f16) {
-    Name += "h";
   } else {
     assert(VT.getScalarType() == MVT::f32 &&
            "Unexpected FP type for reciprocal estimate");

diff  --git a/llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll b/llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll
index 61b483329a4d9..6a5c3e243209a 100644
--- a/llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll
+++ b/llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll
@@ -35,32 +35,6 @@ define <32 x half> @test_sqrt_ph_512_fast(<32 x half> %a0, <32 x half> %a1) {
   ret <32 x half> %2
 }
 
-define <32 x half> @test_sqrt_ph_512_fast_estimate_attribute(<32 x half> %a0, <32 x half> %a1) "reciprocal-estimates"="vec-sqrt" {
-; CHECK-LABEL: test_sqrt_ph_512_fast_estimate_attribute:
-; CHECK:       # %bb.0:
-; CHECK-NEXT:    vrsqrtph %zmm0, %zmm0
-; CHECK-NEXT:    vmulph %zmm0, %zmm1, %zmm0
-; CHECK-NEXT:    retq
-  %1 = call fast <32 x half> @llvm.sqrt.v32f16(<32 x half> %a0)
-  %2 = fdiv fast <32 x half> %a1, %1
-  ret <32 x half> %2
-}
-
-define <32 x half> @test_sqrt_ph_512_fast_estimate_attribute_2(<32 x half> %a0, <32 x half> %a1) "reciprocal-estimates"="vec-sqrth:1" {
-; CHECK-LABEL: test_sqrt_ph_512_fast_estimate_attribute_2:
-; CHECK:       # %bb.0:
-; CHECK-NEXT:    vrsqrtph %zmm0, %zmm2
-; CHECK-NEXT:    vmulph %zmm2, %zmm0, %zmm0
-; CHECK-NEXT:    vfmadd213ph {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to32}, %zmm2, %zmm0
-; CHECK-NEXT:    vmulph {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to32}, %zmm2, %zmm2
-; CHECK-NEXT:    vmulph %zmm1, %zmm0, %zmm0
-; CHECK-NEXT:    vmulph %zmm0, %zmm2, %zmm0
-; CHECK-NEXT:    retq
-  %1 = call fast <32 x half> @llvm.sqrt.v32f16(<32 x half> %a0)
-  %2 = fdiv fast <32 x half> %a1, %1
-  ret <32 x half> %2
-}
-
 define <32 x half> @test_mask_sqrt_ph_512(<32 x half> %a0, <32 x half> %passthru, i32 %mask) {
 ; CHECK-LABEL: test_mask_sqrt_ph_512:
 ; CHECK:       # %bb.0:


        


More information about the llvm-commits mailing list