24 #define FMA3GROUP(Name, Suf, Attrs) \ 25 { { X86::Name##132##Suf, X86::Name##213##Suf, X86::Name##231##Suf }, Attrs }, 27 #define FMA3GROUP_MASKED(Name, Suf, Attrs) \ 28 FMA3GROUP(Name, Suf, Attrs) \ 29 FMA3GROUP(Name, Suf##k, Attrs | X86InstrFMA3Group::KMergeMasked) \ 30 FMA3GROUP(Name, Suf##kz, Attrs | X86InstrFMA3Group::KZeroMasked) 32 #define FMA3GROUP_PACKED_WIDTHS(Name, Suf, Attrs) \ 33 FMA3GROUP(Name, Suf##Ym, Attrs) \ 34 FMA3GROUP(Name, Suf##Yr, Attrs) \ 35 FMA3GROUP_MASKED(Name, Suf##Z128m, Attrs) \ 36 FMA3GROUP_MASKED(Name, Suf##Z128r, Attrs) \ 37 FMA3GROUP_MASKED(Name, Suf##Z256m, Attrs) \ 38 FMA3GROUP_MASKED(Name, Suf##Z256r, Attrs) \ 39 FMA3GROUP_MASKED(Name, Suf##Zm, Attrs) \ 40 FMA3GROUP_MASKED(Name, Suf##Zr, Attrs) \ 41 FMA3GROUP(Name, Suf##m, Attrs) \ 42 FMA3GROUP(Name, Suf##r, Attrs) 44 #define FMA3GROUP_PACKED(Name, Attrs) \ 45 FMA3GROUP_PACKED_WIDTHS(Name, PD, Attrs) \ 46 FMA3GROUP_PACKED_WIDTHS(Name, PS, Attrs) 48 #define FMA3GROUP_SCALAR_WIDTHS(Name, Suf, Attrs) \ 49 FMA3GROUP(Name, Suf##Zm, Attrs) \ 50 FMA3GROUP_MASKED(Name, Suf##Zm_Int, Attrs | X86InstrFMA3Group::Intrinsic) \ 51 FMA3GROUP(Name, Suf##Zr, Attrs) \ 52 FMA3GROUP_MASKED(Name, Suf##Zr_Int, Attrs | X86InstrFMA3Group::Intrinsic) \ 53 FMA3GROUP(Name, Suf##m, Attrs) \ 54 FMA3GROUP(Name, Suf##m_Int, Attrs | X86InstrFMA3Group::Intrinsic) \ 55 FMA3GROUP(Name, Suf##r, Attrs) \ 56 FMA3GROUP(Name, Suf##r_Int, Attrs | X86InstrFMA3Group::Intrinsic) 58 #define FMA3GROUP_SCALAR(Name, Attrs) \ 59 FMA3GROUP_SCALAR_WIDTHS(Name, SD, Attrs) \ 60 FMA3GROUP_SCALAR_WIDTHS(Name, SS, Attrs) \ 62 #define FMA3GROUP_FULL(Name, Attrs) \ 63 FMA3GROUP_PACKED(Name, Attrs) \ 64 FMA3GROUP_SCALAR(Name, Attrs) 75 #define FMA3GROUP_PACKED_AVX512_WIDTHS(Name, Type, Suf, Attrs) \ 76 FMA3GROUP_MASKED(Name, Type##Z128##Suf, Attrs) \ 77 FMA3GROUP_MASKED(Name, Type##Z256##Suf, Attrs) \ 78 FMA3GROUP_MASKED(Name, Type##Z##Suf, Attrs) 80 #define FMA3GROUP_PACKED_AVX512(Name, Suf, Attrs) \ 81 FMA3GROUP_PACKED_AVX512_WIDTHS(Name, PD, Suf, Attrs) \ 82 FMA3GROUP_PACKED_AVX512_WIDTHS(Name, PS, Suf, Attrs) 84 #define FMA3GROUP_PACKED_AVX512_ROUND(Name, Suf, Attrs) \ 85 FMA3GROUP_MASKED(Name, PDZ##Suf, Attrs) \ 86 FMA3GROUP_MASKED(Name, PSZ##Suf, Attrs) 88 #define FMA3GROUP_SCALAR_AVX512_ROUND(Name, Suf, Attrs) \ 89 FMA3GROUP(Name, SDZ##Suf, Attrs) \ 90 FMA3GROUP_MASKED(Name, SDZ##Suf##_Int, Attrs) \ 91 FMA3GROUP(Name, SSZ##Suf, Attrs) \ 92 FMA3GROUP_MASKED(Name, SSZ##Suf##_Int, Attrs) 118 static std::atomic<bool> TableChecked(
false);
119 if (!TableChecked.load(std::memory_order_relaxed)) {
124 "FMA3 tables not sorted!");
125 TableChecked.store(
true, std::memory_order_relaxed);
141 ((BaseOpcode >= 0x96 && BaseOpcode <= 0x9F) ||
142 (BaseOpcode >= 0xA6 && BaseOpcode <= 0xAF) ||
143 (BaseOpcode >= 0xB6 && BaseOpcode <= 0xBF));
160 unsigned FormIndex = ((BaseOpcode - 0x90) >> 4) & 0x3;
165 return Group.Opcodes[FormIndex] < Opcode;
167 assert(
I != Table.
end() &&
I->Opcodes[FormIndex] == Opcode &&
168 "Couldn't find FMA3 opcode!");
const_iterator end(StringRef path)
Get end iterator over path.
static void verifyTables()
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
This class represents lattice values for constants.
This class is used to group {132, 213, 231} forms of FMA opcodes together.
#define FMA3GROUP_PACKED(Name, Attrs)
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
uint8_t getBaseOpcodeFor(uint64_t TSFlags)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
auto lower_bound(R &&Range, ForwardIt I) -> decltype(adl_begin(Range))
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
const X86InstrFMA3Group * getFMA3Group(unsigned Opcode, uint64_t TSFlags)
Returns a reference to a group of FMA3 opcodes to where the given Opcode is included.
static const X86InstrFMA3Group RoundGroups[]
#define FMA3GROUP_PACKED_AVX512_ROUND(Name, Suf, Attrs)
#define FMA3GROUP_FULL(Name, Attrs)
This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of ...
static const X86InstrFMA3Group Groups[]
#define FMA3GROUP_SCALAR_AVX512_ROUND(Name, Suf, Attrs)
static const X86InstrFMA3Group BroadcastGroups[]
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
#define FMA3GROUP_PACKED_AVX512(Name, Suf, Attrs)