[PATCH] D19488: [CodeGenPrepare] use branch weight metadata to decide if a select should be turned into a branch

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 13:28:15 PDT 2016


hfinkel added inline comments.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4558
@@ +4557,3 @@
+    auto Probability = BranchProbability::getBranchProbability(Max, Sum);
+    if (Probability > TLI->getPredictableBranchThreshold())
+      return true;
----------------
Does this handle both extremes (i.e. almost always true and almost always false)?


http://reviews.llvm.org/D19488





More information about the llvm-commits mailing list