Skip to content

Commit

Permalink
Merge pull request #6474 from jamesgua/NumOMRTypes
Browse files Browse the repository at this point in the history
Skip enum NumOMRTypes in for loop
  • Loading branch information
0xdaryl committed Jun 17, 2022
2 parents 9b49cb6 + 45a7e52 commit 838e728
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/optimizer/OMRSimplifierHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ bool decodeConversionOpcode(TR::ILOpCode op, TR::DataType nodeDataType, TR::Data
TR::ILOpCodes opValue = op.getOpCodeValue();
for (int i = 0; i < TR::NumAllTypes; i++)
{
if (TR::NumOMRTypes == i)
{
continue;
}
sourceDataType = (TR::DataTypes)i;
if (opValue == TR::ILOpCode::getProperConversion(sourceDataType, targetDataType, false /*!wantZeroExtension*/))
{
Expand Down

0 comments on commit 838e728

Please sign in to comment.