[all-commits] [llvm/llvm-project] 424c42: [SimplifyCFG] Add optimization for switches of pow...

Daniil via All-commits all-commits at lists.llvm.org
Fri Nov 17 23:14:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 424c4249cc55ef515914318b246ea9e408be75ab
      https://github.com/llvm/llvm-project/commit/424c4249cc55ef515914318b246ea9e408be75ab
  Author: Daniil <38176339+DKay7 at users.noreply.github.com>
  Date:   2023-11-18 (Sat, 18 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/CodeGen/AArch64/switch-unreachable-default.ll
    A llvm/test/Transforms/SimplifyCFG/RISCV/switch-of-powers-of-two.ll

  Log Message:
  -----------
  [SimplifyCFG] Add optimization for switches of powers of two (#70977)

Optimization reduces the range for switches whose cases are positive powers
of two by replacing each case with count_trailing_zero(case).

Resolves #70756




More information about the All-commits mailing list