Skip to content

Commit f8633a3

Browse files
authored
enable more containment optimizations in tier0 (#117512)
1 parent 135a4af commit f8633a3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/coreclr/jit/decomposelongs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ GenTree* DecomposeLongs::DecomposeNode(GenTree* tree)
178178
return tree->gtNext;
179179
}
180180
}
181-
else if (user->OperIs(GT_STOREIND) && tree->OperIsHWIntrinsic() && m_compiler->opts.OptimizationEnabled())
181+
else if (user->OperIs(GT_STOREIND) && tree->OperIsHWIntrinsic() && m_compiler->opts.Tier0OptimizationEnabled())
182182
{
183183
NamedIntrinsic intrinsicId = tree->AsHWIntrinsic()->GetHWIntrinsicId();
184184
if (HWIntrinsicInfo::IsVectorToScalar(intrinsicId) && m_lowering->IsSafeToContainMem(user, tree))

src/coreclr/jit/gentree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20707,7 +20707,7 @@ bool GenTree::isEmbeddedMaskingCompatible(Compiler* comp, unsigned tgtMaskSize,
2070720707
return false;
2070820708
}
2070920709

20710-
if (comp->opts.MinOpts())
20710+
if (!comp->opts.Tier0OptimizationEnabled())
2071120711
{
2071220712
return false;
2071320713
}

src/coreclr/jit/lowerxarch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7773,7 +7773,7 @@ void Lowering::ContainCheckStoreIndir(GenTreeStoreInd* node)
77737773
}
77747774

77757775
// If the source is a BSWAP, contain it on supported hardware to generate a MOVBE.
7776-
if (comp->opts.OptimizationEnabled())
7776+
if (comp->opts.Tier0OptimizationEnabled())
77777777
{
77787778
if (src->OperIs(GT_BSWAP, GT_BSWAP16) && comp->compOpportunisticallyDependsOn(InstructionSet_AVX2))
77797779
{
@@ -8370,7 +8370,7 @@ void Lowering::ContainCheckCast(GenTreeCast* node)
83708370
srcIsContainable = !varTypeIsSmall(srcType) && ((srcType != TYP_ULONG) || comp->canUseEvexEncoding());
83718371
}
83728372
}
8373-
else if (comp->opts.OptimizationEnabled() && varTypeIsIntegral(castOp) && varTypeIsIntegral(castToType))
8373+
else if (comp->opts.Tier0OptimizationEnabled() && varTypeIsIntegral(castOp) && varTypeIsIntegral(castToType))
83748374
{
83758375
// Most integral casts can be re-expressed as loads, except those that would be changing the sign.
83768376
if (!varTypeIsSmall(castOp) || (varTypeIsUnsigned(castOp) == node->IsZeroExtending()))

0 commit comments

Comments
 (0)