[all-commits] [llvm/llvm-project] f76c13: [SimplifyCFG] Fix weight calculation for `simplify...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Wed Nov 5 12:02:54 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f76c132230326a296c4fb8f7cb6c0fb6b943fadb
      https://github.com/llvm/llvm-project/commit/f76c132230326a296c4fb8f7cb6c0fb6b943fadb
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2025-11-05 (Wed, 05 Nov 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/X86/switch-of-powers-of-two.ll

  Log Message:
  -----------
  [SimplifyCFG] Fix weight calculation for `simplifySwitchOfPowersOfTwo` (#165956)

Continued from #165804

This maintains the BFI of the default branch. Originally `10/63`​, post-pass, it ends up being `5/63 + 58/63 * 5/58`​(first term is from `PROF`​, second is the probability of going to the switch lookup times the probability, there, of taking the default branch)

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