[llvm] [PGO] Fix zeroed estimated trip count (PR #167792)

Joel E. Denny via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 08:04:19 PST 2025


================
@@ -912,12 +912,14 @@ llvm::getLoopEstimatedTripCount(Loop *L,
   }
 
   // Return the estimated trip count from metadata unless the metadata is
-  // missing or has no value.
+  // missing or has no value.  Return std::nullopt if it's zero.
----------------
jdenny-ornl wrote:

Done.  Thanks for the review.

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


More information about the llvm-commits mailing list