Skip to content

[LLVM][ARM] Latency mutations for cortex m55,m7 and m85 #115153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions llvm/lib/Target/ARM/ARMBaseInstrInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,34 @@ unsigned getBLXOpcode(const MachineFunction &MF);
unsigned gettBLXrOpcode(const MachineFunction &MF);
unsigned getBLXpredOpcode(const MachineFunction &MF);

inline bool isMVEVectorInstruction(const MachineInstr *MI) {
// This attempts to remove non-mve instructions (scalar shifts), which
// are just DPU CX instruction.
switch (MI->getOpcode()) {
case ARM::MVE_SQSHL:
case ARM::MVE_SRSHR:
case ARM::MVE_UQSHL:
case ARM::MVE_URSHR:
case ARM::MVE_SQRSHR:
case ARM::MVE_UQRSHL:
case ARM::MVE_ASRLr:
case ARM::MVE_ASRLi:
case ARM::MVE_LSLLr:
case ARM::MVE_LSLLi:
case ARM::MVE_LSRL:
case ARM::MVE_SQRSHRL:
case ARM::MVE_SQSHLL:
case ARM::MVE_SRSHRL:
case ARM::MVE_UQRSHLL:
case ARM::MVE_UQSHLL:
case ARM::MVE_URSHRL:
return false;
}
const MCInstrDesc &MCID = MI->getDesc();
uint64_t Flags = MCID.TSFlags;
return (Flags & ARMII::DomainMask) == ARMII::DomainMVE;
}

} // end namespace llvm

#endif // LLVM_LIB_TARGET_ARM_ARMBASEINSTRINFO_H
Loading
Loading