[llvm-branch-commits] [llvm] [EarlyIfCvt] Take branch probablities into consideration (PR #97808)

Pengcheng Wang via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 10 00:01:24 PDT 2024


================
@@ -913,6 +913,10 @@ class TargetInstrInfo : public MCInstrInfo {
     return false;
   }
 
+  /// Return true if the target will always try to convert predictable branches
+  /// to selects.
+  virtual bool shouldConvertPredictableBranches() const { return true; }
+
----------------
wangpc-pp wrote:

I think the current behavior is we will convert predictable branches. To not touch too much targets, I leave it to be true here.

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


More information about the llvm-branch-commits mailing list