================
@@ -6008,6 +6009,15 @@ static bool combineInstructionsOverFunction(
     if (!MadeChangeInThisIteration)
       break;
 
+    // Issue #147390: InstCombine emits `select` as rewrites of instructions
+    // without metadata. It may be possible to synthesize some more meaningful
+    // profiles in some cases (based on operands or based on the pattern)
+    if (auto EC = F.getEntryCount(); EC.has_value() && EC->getCount() > 0)
+      for (auto &BB : F)
+        for (auto &I : BB)
+          if (isa<SelectInst>(I) && !I.getMetadata(LLVMContext::MD_prof))
----------------
boomanaiden154 wrote:

Ah, forgot that the verifier runs after every pass. This seems reasonable 
enough to me then.

https://github.com/llvm/llvm-project/pull/157599
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to