1 //===- AArch64SchedPredNeoverse.td - AArch64 Sched Preds -----*- tablegen -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file defines scheduling predicate definitions that are used by the
10 // AArch64 Neoverse processors.
12 //===----------------------------------------------------------------------===//
14 // Auxiliary predicates.
16 // Check for LSL shift == 0
17 def NeoverseNoLSL : MCSchedPredicate<
18 CheckAll<[CheckShiftLSL,
21 // Identify LDR/STR H/Q-form scaled (and potentially extended) FP instructions
22 def NeoverseHQForm : MCSchedPredicate<
24 CheckAny<[CheckHForm, CheckQForm]>,
25 CheckImmOperand<4, 1>]>>;
27 // Check if <Pd> == <Pg>
28 def NeoversePdIsPgFn : TIIPredicate<
29 "isNeoversePdSameAsPg",
30 MCOpcodeSwitchStatement<
31 [MCOpcodeSwitchCase<[BRKA_PPmP, BRKB_PPmP],
32 MCReturnStatement<CheckSameRegOperand<1, 2>>>],
33 MCReturnStatement<CheckSameRegOperand<0, 1>>>>;
34 def NeoversePdIsPg : MCSchedPredicate<NeoversePdIsPgFn>;
36 // Check if SVE INC/DEC (scalar), ALL, {1, 2, 4}
37 def NeoverseCheapIncDec : MCSchedPredicate<
38 CheckAll<[CheckOpcode<[
42 DECW_XPiI, DECD_XPiI]>,
43 CheckImmOperand<2, 31>,
45 CheckImmOperand<3, 1>,
46 CheckImmOperand<3, 2>,
47 CheckImmOperand<3, 4>]>]>>;
49 // Identify "[SU]?(MADD|MSUB)L?" as the alias for "[SU]?(MUL|MNEG)L?".
50 def NeoverseMULIdiomPred : MCSchedPredicate< // <op> Rd, Rs, Rv, ZR
51 CheckAll<[CheckOpcode<
55 SMSUBLrrr, UMSUBLrrr]>,
58 def NeoverseZeroMove : MCSchedPredicate<
62 CheckAll<[CheckOpcode<[MOVZWi, MOVZXi]>,
63 CheckAll<[CheckImmOperand<1, 0>,
64 CheckImmOperand<2, 0>]>]>,
69 CheckAll<[CheckOpcode<[ORRWrs, ORRXrs]>,
70 CheckAll<[CheckIsReg1Zero,
71 CheckImmOperand<3, 0>]>]>,
76 CheckAll<[CheckOpcode<[FMOVWHr, FMOVXHr,
81 CheckAll<[CheckOpcode<[MOVID, MOVIv2d_ns]>,
82 CheckImmOperand<1, 0>]>