[clang] [llvm] [LoongArch] [CodeGen] Add options for Clang to generate LoongArch-specific frecipe & frsqrte instructions (PR #109917)

via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 28 18:33:48 PDT 2024


================
@@ -251,6 +251,20 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D,
     } else /*-mno-lasx*/
       Features.push_back("-lasx");
   }
+
+  // Select frecipe feature determined by -m[no-]frecipe.
+  if (const Arg *A =
+          Args.getLastArg(options::OPT_mfrecipe, options::OPT_mno_frecipe)) {
+    // FRECIPE depends on 64-bit FPU.
----------------
tangaac wrote:

My Bad. I mistakenly thought that the LoongArch v1.1 instructions required fpu64 like lsx.

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


More information about the cfe-commits mailing list