[llvm] [SPARC] Use FMA instructions when we have UA2007 (PR #148434)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 04:59:31 PDT 2025
================
@@ -3570,6 +3572,15 @@ bool SparcTargetLowering::isCheapToSpeculateCttz(Type *Ty) const {
return isCheapToSpeculateCtlz(Ty);
}
+bool SparcTargetLowering::isFMAFasterThanFMulAndFAdd(const MachineFunction &MF,
+ EVT VT) const {
+ return Subtarget->isUA2007();
+}
+
+bool SparcTargetLowering::enableAggressiveFMAFusion(EVT VT) const {
+ return Subtarget->isUA2007();
+}
+
----------------
arsenm wrote:
Probably yes, I think this is a modifier that only matters if isFMAFasterThanFMulAndFAdd was true anyway
https://github.com/llvm/llvm-project/pull/148434
More information about the llvm-commits
mailing list