[llvm] [SelectOpt] Add handling for Select-like operations. (PR #77284)

Sotiris Apostolakis via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 15:02:49 PST 2024


================
@@ -378,6 +378,15 @@ class TargetTransformInfoImplBase {
 
   bool enableSelectOptimize() const { return true; }
 
+  bool shouldTreatInstructionLikeSelect(Instruction *I) {
----------------
sapostolakis wrote:

I think that there should be a flag exposed to users that can disable the select-like but not SelectInst part just in case of regressions and for easier perf comparisons. shouldTreatInstructionLikeSelect function will return false if flag disables selectlike optis in select-optimize

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


More information about the llvm-commits mailing list