================ @@ -500,7 +500,10 @@ void PPCPassConfig::addIRPasses() { } bool PPCPassConfig::addPreISel() { - if (EnableGlobalMerge) + if ((EnableGlobalMerge.getNumOccurrences() > 0) + ? EnableGlobalMerge + : (TM->getTargetTriple().isOSAIX() && + getOptLevel() != CodeGenOptLevel::None)) ---------------- redstar wrote:
First thought: there is a slight change in the semantics. The condition `EnableGlobalMerge.getNumOccurrences() > 0` checks how often the option was specified on the command line. If I specify `-ppc-global-merge=false` then the original `if` returns `false` (because the option was specified 1 time, and it's value is `false` but the value of the changed condition depends on being on AIX or not. If the former is really the intended functionality then IMHO it warrants a big comment (e.g. "Specifying the command line option overrides AIX default"), just to clarify it. https://github.com/llvm/llvm-project/pull/101226 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits