[llvm] [SPARC] Use FMA instructions when we have UA2007 (PR #148434)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 07:08:26 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();
+}
+
----------------
koachan wrote:
Would it be safe if I change those to return a constant `true`?
Given that on targets without UA2007 FMAs are going to be expanded anyway...
https://github.com/llvm/llvm-project/pull/148434
More information about the llvm-commits
mailing list