diff --git a/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp b/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp index 6e3dc18a1..f54d8259d 100644 --- a/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp +++ b/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp @@ -118,8 +118,7 @@ void IRValidation::Run(IREmitter* IREmit) { } } - uint8_t NumArgs = IR::GetRAArgs(IROp->Op); - + const uint8_t NumArgs = IR::GetRAArgs(IROp->Op); for (uint32_t i = 0; i < NumArgs; ++i) { OrderedNodeWrapper Arg = IROp->Args[i]; const auto ArgID = Arg.ID(); @@ -127,8 +126,6 @@ void IRValidation::Run(IREmitter* IREmit) { continue; } - IROps Op = CurrentIR.GetOp(Arg)->Op; - if (ArgID.IsValid()) { Uses[ArgID.Value]++; } @@ -136,7 +133,8 @@ void IRValidation::Run(IREmitter* IREmit) { // We do not validate the location of inline constants because it's // irrelevant, they're ignored by RA and always inlined to where they // need to be. This lets us pool inline constants globally. - bool Ignore = (Op == OP_IRHEADER || Op == OP_INLINECONSTANT); + const IROps Op = CurrentIR.GetOp(Arg)->Op; + const bool Ignore = (Op == OP_IRHEADER || Op == OP_INLINECONSTANT); if (!Ignore && ArgID.IsValid() && !NodeIsLive.Get(ArgID.Value)) { HadError = true;