Author: Jim Lin
Date: 2024-11-08T13:01:02+08:00
New Revision: ae509a085836079585228aede8a5017ad80e1aa9

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

LOG: [RISCV][Clang] Reuse RVVOutBuiltinSet multiclass for builtin vfrsqrt7. NFC 
(#115269)

Added: 
    

Modified: 
    clang/include/clang/Basic/riscv_vector.td
    clang/include/clang/Basic/riscv_vector_common.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/riscv_vector.td 
b/clang/include/clang/Basic/riscv_vector.td
index 1387494c4aeb00..74b9a7fc753a62 100644
--- a/clang/include/clang/Basic/riscv_vector.td
+++ b/clang/include/clang/Basic/riscv_vector.td
@@ -1859,7 +1859,7 @@ let ManualCodegen = [{
 }
 
 // 13.9. Vector Floating-Point Reciprocal Square-Root Estimate Instruction
-def vfrsqrt7 : RVVFloatingUnaryVVBuiltin;
+defm vfrsqrt7 : RVVOutBuiltinSet<"vfrsqrt7", "xfd", [["v", "v", "vv"]]>;
 
 // 13.11. Vector Floating-Point MIN/MAX Instructions
 defm vfmin : RVVFloatingBinBuiltinSet;

diff  --git a/clang/include/clang/Basic/riscv_vector_common.td 
b/clang/include/clang/Basic/riscv_vector_common.td
index 33f6441217a5e1..b38ca7341361c4 100644
--- a/clang/include/clang/Basic/riscv_vector_common.td
+++ b/clang/include/clang/Basic/riscv_vector_common.td
@@ -576,14 +576,6 @@ let UnMaskedPolicyScheme = HasPassthruOperand,
   }
 }
 
-class RVVFloatingUnaryBuiltin<string builtin_suffix, string ir_suffix,
-                              string prototype>
-    : RVVOutBuiltin<ir_suffix, prototype, "xfd"> {
-  let Name = NAME # "_" # builtin_suffix;
-}
-
-class RVVFloatingUnaryVVBuiltin : RVVFloatingUnaryBuiltin<"v", "v", "vv">;
-
 class RVVConvBuiltin<string suffix, string prototype, string type_range,
                      string overloaded_name>
     : RVVBuiltin<suffix, prototype, type_range> {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to