Skip to content

Commit fbc7ffe

Browse files
committed
Clean up
1 parent 8ccc15e commit fbc7ffe

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/coreclr/jit/lower.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5041,16 +5041,17 @@ bool Lowering::TryCreateAddrMode(GenTree* addr, bool isContainable, var_types ta
50415041
GenTreeCast* cast = index->gtGetOp1()->AsCast();
50425042
assert(cast->isContained());
50435043

5044-
unsigned shiftBy = (unsigned)index->gtGetOp2()->AsIntCon()->IconValue();
5045-
unsigned castTo = genTypeSize(cast->CastToType());
5046-
unsigned castFrom = genTypeSize(cast->CastFromType());
5047-
unsigned target = genTypeSize(targetType);
5044+
const unsigned shiftBy = (unsigned)index->gtGetOp2()->AsIntCon()->IconValue();
5045+
const unsigned castTo = genTypeSize(cast->CastToType());
5046+
const unsigned castFrom = genTypeSize(cast->CastFromType());
5047+
const unsigned target = genTypeSize(targetType);
50485048

5049-
// For now we only handle the most popular case for indices 32 -> 64 sign/zero extension
5050-
// Where target is 32 or 64. TODO: enable for 8 and 16
5049+
// For now we only handle the most popular cases for indices 32 -> 64 sign/zero extension
5050+
// Where target is 32 or 64. TODO: enable for 8 and 16 (requires some changes in the emitter)
50515051
if ((castFrom == 4) && (castTo == 8) && (target == (1U << shiftBy)) && (target >= 4) && (scale == 1) &&
50525052
(offset == 0))
50535053
{
5054+
// TODO: make sure that genCreateAddrMode mark such BFIZ trees as GTF_DONT_CSE for better CQ.
50545055
MakeSrcContained(addrMode, index);
50555056
}
50565057
}

0 commit comments

Comments
 (0)