[llvm] [AArch64] Give a higher cost for more expensive SVE FCMP instructions (PR #153816)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 00:46:42 PDT 2025
================
@@ -4409,6 +4409,33 @@ AArch64TTIImpl::getAddressComputationCost(Type *PtrTy, ScalarEvolution *SE,
return 1;
}
+/// Check whether Opcode1 has less throughput according to the scheduling
+/// model than Opcode2.
+bool AArch64TTIImpl::hasKnownLowerThroughputFromSchedulingModel(
+ unsigned Opcode1, unsigned Opcode2) const {
+ const MCSchedModel &Sched = ST->getSchedModel();
+ const TargetInstrInfo *TII = ST->getInstrInfo();
+ if (!Sched.hasInstrSchedModel())
+ return false;
+
+ const MCSchedClassDesc *SCD1 =
+ Sched.getSchedClassDesc(TII->get(Opcode1).getSchedClass());
+ const MCSchedClassDesc *SCD2 =
+ Sched.getSchedClassDesc(TII->get(Opcode2).getSchedClass());
+ // We cannot handle variant scheduling classes without an MI. If we need to
+ // support them for any of the instructions we query the information of we
+ // might need to add a qay to resolve them without a MI or not use the
----------------
david-arm wrote:
nit: I think this should be `... a way to ...`
https://github.com/llvm/llvm-project/pull/153816
More information about the llvm-commits
mailing list