[llvm] [AMDGPU][CodeGen] remove the f64->f32->f16 pattern since two (PR #105707)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 11:01:43 PDT 2024


https://github.com/broxigarchen created https://github.com/llvm/llvm-project/pull/105707

step round down is invalid for f64 to f16 conversion

>From ed953b4bd3cc5c62fdf0b75b5df04991d2321e7f Mon Sep 17 00:00:00 2001
From: guochen2 <guochen2 at amd.com>
Date: Thu, 22 Aug 2024 14:00:24 -0400
Subject: [PATCH] [AMDGPU][CodeGen] remove the f64->f32->f16 pattern since two
 step round down is invalid for f64 to f16 conversion

---
 llvm/lib/Target/AMDGPU/SIInstructions.td | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td
index e7831d00a3a4a8..3c93c3daccdcdc 100644
--- a/llvm/lib/Target/AMDGPU/SIInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SIInstructions.td
@@ -1123,11 +1123,6 @@ multiclass f16_fp_Pats<Instruction cvt_f16_f32_inst_e64, Instruction cvt_f32_f16
     (cvt_f32_f16_inst_e64 SRCMODS.NEG, $src0)
   >;
 
-  def : GCNPat <
-    (f64 (any_fpextend f16:$src)),
-    (V_CVT_F64_F32_e32 (cvt_f32_f16_inst_e64 SRCMODS.NONE, $src))
-  >;
-
   // fp_to_fp16 patterns
   def : GCNPat <
     (i32 (AMDGPUfp_to_f16 (f32 (VOP3Mods f32:$src0, i32:$src0_modifiers)))),



More information about the llvm-commits mailing list