[llvm] [AMDGPU] Implement IR variant of isFMAFasterThanFMulAndFAdd (PR #121465)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 06:25:16 PST 2025
================
@@ -5731,6 +5731,35 @@ 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 {
+ switch (Ty->getScalarSizeInBits()) {
+ case 16: {
+ SIModeRegisterDefaults Mode = SIModeRegisterDefaults(F, *Subtarget);
----------------
arsenm wrote:
Should probably try to defer parsing the attribute as late as possible (i.e. check the features first, and only check this if the mode matters for the subtarget)
https://github.com/llvm/llvm-project/pull/121465
More information about the llvm-commits
mailing list