[all-commits] [llvm/llvm-project] 769976: [slp][profcheck] Mark `select`s as having unknown ...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Mon Oct 13 09:06:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 769976261249109d02516eb684584c1c8576a882
      https://github.com/llvm/llvm-project/commit/769976261249109d02516eb684584c1c8576a882
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/utils/profcheck-xfail.txt

  Log Message:
  -----------
  [slp][profcheck] Mark `select`s as having unknown profile (#162960)

There are 2 cases: 

- either the `select`​ condition is a vector of bools, case in which we don't currently have a way to represent the per-element branch probabilities anyway;
- or the select condition is a scalar, for example from a `llvm.vector.reduce`​. We could potentially try and do more here - if the reduced vector contained conditions from other selects, for instance

In either case, IIUC, chances are the `select`​ doesn't get lowered to a branch, at least I'm not seeing any evidence of that in an internal complex application (CSFDO + ThinLTO). Seems sufficient to mark the selects are unknown (for profiled functions); since that metadata carries with it the pass name (`DEBUG_TYPE`​) that marked it as such, we can revisit this if we detect later lowerings of these selects that would have required an actual profile.



Issue #147390



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list