diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index d55090e161523..3c90ddf915cde 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -677,7 +677,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