[llvm] [InstCombine] Preserve profile data with select instructions and binary operators (PR #158375)

Alan Zhao via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 10:44:15 PDT 2025


================
@@ -144,6 +144,8 @@ static cl::opt<unsigned>
 MaxArraySize("instcombine-maxarray-size", cl::init(1024),
              cl::desc("Maximum array size considered when doing a combine"));
 
+extern cl::opt<bool> ProfcheckDisableMetadataFixes;
----------------
alanzhao1 wrote:

I accidentally dropped my usage of this flag when I converted this PR to use `IRBuilderBase::CreateSelect(...)`. It's back now.

For context, this flag exists so we can measure the performance impact of these profdata fixes. See for example https://github.com/llvm/llvm-project/commit/f5d284309fe4f4e83f879f08356d149000bbc762#diff-4736f0a87977bfa43adb3574d8876f9a91a398e3a0aa910dad39043fc1170f4aR182.

https://github.com/llvm/llvm-project/pull/158375


More information about the llvm-commits mailing list