Skip to content

Commit 764eb58

Browse files
Adding EVEX encoding pathways for emitOutputRRR().
Adding flag to turn on EVEX encoding.
1 parent 242c95a commit 764eb58

File tree

6 files changed

+1155
-91
lines changed

6 files changed

+1155
-91
lines changed

src/coreclr/jit/compiler.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,11 @@ void Compiler::compSetProcessor()
22842284
#ifdef TARGET_XARCH
22852285
if (!compIsForInlining())
22862286
{
2287+
if (canUseEvexEncoding())
2288+
{
2289+
codeGen->GetEmitter()->SetUseEVEXEncoding(true);
2290+
// TODO-XArch-AVX512: Revisit other flags to be set once avx512 instructions are added.
2291+
}
22872292
if (canUseVexEncoding())
22882293
{
22892294
codeGen->GetEmitter()->SetUseVEXEncoding(true);

src/coreclr/jit/compiler.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8923,6 +8923,15 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
89238923
#endif
89248924
}
89258925

8926+
bool canUseEvexEncoding() const
8927+
{
8928+
#ifdef TARGET_XARCH
8929+
return compOpportunisticallyDependsOn(InstructionSet_AVX512F);
8930+
#else
8931+
return false;
8932+
#endif
8933+
}
8934+
89268935
/*
89278936
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
89288937
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

src/coreclr/jit/emit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ class emitter
445445

446446
#ifdef TARGET_XARCH
447447
SetUseVEXEncoding(false);
448+
SetUseEVEXEncoding(false);
448449
#endif // TARGET_XARCH
449450

450451
emitDataSecCur = nullptr;

0 commit comments

Comments
 (0)