diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 0b47dfca507d2..ea21477c8f56c 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -608,7 +608,8 @@ CodeGenOpt::Level CodeGenOptLevelFor(int optlevel) #ifdef DISABLE_OPT return CodeGenOpt::None; #else - return optlevel < 2 ? CodeGenOpt::None : + return optlevel == 0 ? CodeGenOpt::None : + optlevel == 1 ? CodeGenOpt::Less : optlevel == 2 ? CodeGenOpt::Default : CodeGenOpt::Aggressive; #endif