forked from OSchip/llvm-project
parent
ba894c3c0d
commit
271f9ded44
|
@ -6715,16 +6715,16 @@ static const uint16_t ReplaceableInstrsAVX2[][3] = {
|
||||||
// domains, but they require a bit more work than just switching opcodes.
|
// domains, but they require a bit more work than just switching opcodes.
|
||||||
|
|
||||||
static const uint16_t *lookup(unsigned opcode, unsigned domain) {
|
static const uint16_t *lookup(unsigned opcode, unsigned domain) {
|
||||||
for (unsigned i = 0, e = array_lengthof(ReplaceableInstrs); i != e; ++i)
|
for (const uint16_t (&Row)[3] : ReplaceableInstrs)
|
||||||
if (ReplaceableInstrs[i][domain-1] == opcode)
|
if (Row[domain-1] == opcode)
|
||||||
return ReplaceableInstrs[i];
|
return Row;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uint16_t *lookupAVX2(unsigned opcode, unsigned domain) {
|
static const uint16_t *lookupAVX2(unsigned opcode, unsigned domain) {
|
||||||
for (unsigned i = 0, e = array_lengthof(ReplaceableInstrsAVX2); i != e; ++i)
|
for (const uint16_t (&Row)[3] : ReplaceableInstrsAVX2)
|
||||||
if (ReplaceableInstrsAVX2[i][domain-1] == opcode)
|
if (Row[domain-1] == opcode)
|
||||||
return ReplaceableInstrsAVX2[i];
|
return Row;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue