Skip to content

Commit 0d59a54

Browse files
committed
Revert "[SelectionDAG][X86] Support f16 in getReciprocalOpName."
This reverts commit 86b5e25. This wasn't supposed to be commited yet
1 parent 04f815c commit 0d59a54

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

llvm/lib/CodeGen/TargetLoweringBase.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,11 +2072,9 @@ static std::string getReciprocalOpName(bool IsSqrt, EVT VT) {
20722072

20732073
Name += IsSqrt ? "sqrt" : "div";
20742074

2075-
// TODO: Handle other float types?
2075+
// TODO: Handle "half" or other float types?
20762076
if (VT.getScalarType() == MVT::f64) {
20772077
Name += "d";
2078-
} else if (VT.getScalarType() == MVT::f16) {
2079-
Name += "h";
20802078
} else {
20812079
assert(VT.getScalarType() == MVT::f32 &&
20822080
"Unexpected FP type for reciprocal estimate");

llvm/test/CodeGen/X86/avx512fp16-intrinsics.ll

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,6 @@ define <32 x half> @test_sqrt_ph_512_fast(<32 x half> %a0, <32 x half> %a1) {
3535
ret <32 x half> %2
3636
}
3737

38-
define <32 x half> @test_sqrt_ph_512_fast_estimate_attribute(<32 x half> %a0, <32 x half> %a1) "reciprocal-estimates"="vec-sqrt" {
39-
; CHECK-LABEL: test_sqrt_ph_512_fast_estimate_attribute:
40-
; CHECK: # %bb.0:
41-
; CHECK-NEXT: vrsqrtph %zmm0, %zmm0
42-
; CHECK-NEXT: vmulph %zmm0, %zmm1, %zmm0
43-
; CHECK-NEXT: retq
44-
%1 = call fast <32 x half> @llvm.sqrt.v32f16(<32 x half> %a0)
45-
%2 = fdiv fast <32 x half> %a1, %1
46-
ret <32 x half> %2
47-
}
48-
49-
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" {
50-
; CHECK-LABEL: test_sqrt_ph_512_fast_estimate_attribute_2:
51-
; CHECK: # %bb.0:
52-
; CHECK-NEXT: vrsqrtph %zmm0, %zmm2
53-
; CHECK-NEXT: vmulph %zmm2, %zmm0, %zmm0
54-
; CHECK-NEXT: vfmadd213ph {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to32}, %zmm2, %zmm0
55-
; CHECK-NEXT: vmulph {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to32}, %zmm2, %zmm2
56-
; CHECK-NEXT: vmulph %zmm1, %zmm0, %zmm0
57-
; CHECK-NEXT: vmulph %zmm0, %zmm2, %zmm0
58-
; CHECK-NEXT: retq
59-
%1 = call fast <32 x half> @llvm.sqrt.v32f16(<32 x half> %a0)
60-
%2 = fdiv fast <32 x half> %a1, %1
61-
ret <32 x half> %2
62-
}
63-
6438
define <32 x half> @test_mask_sqrt_ph_512(<32 x half> %a0, <32 x half> %passthru, i32 %mask) {
6539
; CHECK-LABEL: test_mask_sqrt_ph_512:
6640
; CHECK: # %bb.0:

0 commit comments

Comments
 (0)