[llvm] [AArch64][GlobalISel] Add codegen for simd fpcvt instructions (PR #156892)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 06:29:34 PDT 2025


================
@@ -5301,6 +5384,32 @@ multiclass FPToIntegerIntPats<Intrinsic round, string INST> {
   def : Pat<(i32 (round f64:$Rn)), (!cast<Instruction>(INST # UWDr) $Rn)>;
   def : Pat<(i64 (round f64:$Rn)), (!cast<Instruction>(INST # UXDr) $Rn)>;
 
+  // For global-isel we can use register classes to determine
+  // which FCVT instruction to use.
+  let Predicates = [HasFPRCVT] in {
+  def : Pat<(i32 (round f16:$Rn)), (!cast<Instruction>(INST # SHr) $Rn)>;
----------------
CarolineConcatto wrote:

Why do we need these patterns, nothing changes when they are removed.

https://github.com/llvm/llvm-project/pull/156892


More information about the llvm-commits mailing list