[llvm] [AMDGPU] Implement IR variant of isFMAFasterThanFMulAndFAdd (PR #121465)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 4 02:00:49 PST 2025
================
@@ -5728,6 +5728,33 @@ bool SITargetLowering::isFMAFasterThanFMulAndFAdd(const MachineFunction &MF,
return false;
}
+// Refer to comments added to the MIR variant of isFMAFasterThanFMulAndFAdd for
+// specific details.
+bool SITargetLowering::isFMAFasterThanFMulAndFAdd(const Function &F,
+ Type *Ty) const {
+ SIModeRegisterDefaults Mode = SIModeRegisterDefaults(F, *Subtarget);
----------------
arsenm wrote:
You should also defer checking the mode until it matters
https://github.com/llvm/llvm-project/pull/121465
More information about the llvm-commits
mailing list