Skip to content
Closed
Prev Previous commit
Next Next commit
Fix "ignoreCase"
  • Loading branch information
EgorBo committed Dec 25, 2020
commit 24c33e97ad8826876ae00415373f3fcf58d9b9b2
5 changes: 3 additions & 2 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4670,7 +4670,7 @@ GenTree* Compiler::impUnrollSpanComparisonAgainstConst(GenTree* span,
return nullptr;
}

bool canBeLowercased = false;
bool canBeLowercased = true;
UINT64 strAsUlong = 0;

for (int i = 0; i < strLen; i++)
Expand All @@ -4683,7 +4683,8 @@ GenTree* Compiler::impUnrollSpanComparisonAgainstConst(GenTree* span,
}
if ((strChar < 'A') || (strChar > 'z'))
{
canBeLowercased = true;
// e.g. ('-' | 0x20) == ('\r' | 0x20) which is not correct.
canBeLowercased = false;
}
strAsUlong |= (strChar << 16UL * i);
}
Expand Down