Skip to content

Commit

Permalink
Ensure that SetContainsAVX passes in the regSize (#98283)
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding authored Feb 12, 2024
1 parent 3352fa4 commit 5a9b431
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/coreclr/jit/lsraxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ int LinearScan::BuildBlockStore(GenTreeBlk* blkNode)
// We need a float temporary if we're doing SIMD operations

buildInternalFloatRegisterDefForNode(blkNode, internalFloatRegCandidates());
SetContainsAVXFlags(size);
SetContainsAVXFlags(regSize);

remainder %= regSize;
}
Expand Down Expand Up @@ -3053,18 +3053,9 @@ void LinearScan::SetContainsAVXFlags(unsigned sizeOfSIMDVector /* = 0*/)

compiler->GetEmitter()->SetContainsAVX(true);

if (sizeOfSIMDVector == 32)
{
compiler->GetEmitter()->SetContains256bitOrMoreAVX(true);
}

if (!compiler->canUseEvexEncoding())
{
return;
}

if (sizeOfSIMDVector == 64)
if (sizeOfSIMDVector >= 32)
{
assert((sizeOfSIMDVector == 32) || ((sizeOfSIMDVector == 64) && compiler->canUseEvexEncoding()));
compiler->GetEmitter()->SetContains256bitOrMoreAVX(true);
}
}
Expand Down

0 comments on commit 5a9b431

Please sign in to comment.