1//==- HexagonPatternsV65.td -------------------------------*- tablegen -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
9multiclass vgathermh<RegisterClass RC> {
10  let isCodeGenOnly = 1, isPseudo = 1, mayLoad = 1, mayStore = 1 in
11  def NAME : CVI_GATHER_TMP_LD_Resource_NoOpcode<(outs ),
12                           (ins  IntRegs:$_dst_, IntRegs:$Rt,
13                                 ModRegs:$Mu, RC:$Vv),
14                           ".error \"should not emit\" ",
15                           []>;
16}
17
18multiclass vgathermw<RegisterClass RC> {
19  let isCodeGenOnly = 1, isPseudo = 1, mayLoad = 1, mayStore = 1 in
20  def NAME : CVI_GATHER_TMP_LD_Resource_NoOpcode<(outs ),
21                           (ins IntRegs:$_dst_, IntRegs:$Rt,
22                                ModRegs:$Mu, RC:$Vv),
23                           ".error \"should not emit\" ",
24                           []>;
25}
26
27multiclass vgathermhw<RegisterClass RC> {
28  let isCodeGenOnly = 1, isPseudo = 1, mayLoad = 1, mayStore = 1 in
29  def NAME : CVI_GATHER_TMP_LD_Resource_NoOpcode<(outs ),
30                           (ins IntRegs:$_dst_, IntRegs:$Rt,
31                                ModRegs:$Mu, RC:$Vv),
32                           ".error \"should not emit\" ",
33                           []>;
34}
35
36defm V6_vgathermh_pseudo  : vgathermh<HvxVR>;
37defm V6_vgathermw_pseudo  : vgathermw<HvxVR>;
38defm V6_vgathermhw_pseudo  : vgathermhw<HvxWR>;
39
40multiclass vgathermhq<RegisterClass RC1, RegisterClass RC2> {
41  let isCodeGenOnly = 1, isPseudo = 1, mayLoad = 1, mayStore = 1 in
42  def NAME : CVI_GATHER_TMP_LD_Resource_NoOpcode<(outs ),
43                           (ins  IntRegs:$_dst_, RC2:$Vq, IntRegs:$Rt,
44                                 ModRegs:$Mu, RC1:$Vv),
45                           ".error \"should not emit\" ",
46                           []>;
47}
48
49multiclass vgathermwq<RegisterClass RC1, RegisterClass RC2> {
50  let isCodeGenOnly = 1, isPseudo = 1, mayLoad = 1, mayStore = 1 in
51  def NAME : CVI_GATHER_TMP_LD_Resource_NoOpcode<(outs ),
52                           (ins IntRegs:$_dst_, RC2:$Vq, IntRegs:$Rt,
53                                ModRegs:$Mu, RC1:$Vv),
54                           ".error \"should not emit\" ",
55                           []>;
56}
57
58multiclass vgathermhwq<RegisterClass RC1, RegisterClass RC2> {
59  let isCodeGenOnly = 1, isPseudo = 1, mayLoad = 1, mayStore = 1 in
60  def NAME : CVI_GATHER_TMP_LD_Resource_NoOpcode<(outs ),
61                           (ins IntRegs:$_dst_, RC2:$Vq, IntRegs:$Rt,
62                                ModRegs:$Mu, RC1:$Vv),
63                           ".error \"should not emit\" ",
64                           []>;
65}
66
67defm V6_vgathermhq_pseudo  : vgathermhq<HvxVR, HvxQR>;
68defm V6_vgathermwq_pseudo  : vgathermwq<HvxVR, HvxQR>;
69defm V6_vgathermhwq_pseudo  : vgathermhwq<HvxWR, HvxQR>;
70