[all-commits] [llvm/llvm-project] b1698d: [LoopUnroll][NFC] Simplify recent block frequency ...

Joel E. Denny via All-commits all-commits at lists.llvm.org
Wed Jan 21 07:40:32 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1698d3ac062f15bda187958a24143a508f4e8a3
      https://github.com/llvm/llvm-project/commit/b1698d3ac062f15bda187958a24143a508f4e8a3
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2026-01-21 (Wed, 21 Jan 2026)

  Changed paths:
    M llvm/test/Transforms/LoopUnroll/branch-weights-freq/peel.ll
    M llvm/test/Transforms/LoopUnroll/branch-weights-freq/unroll-epilog.ll
    M llvm/test/Transforms/LoopUnroll/branch-weights-freq/unroll-partial.ll

  Log Message:
  -----------
  [LoopUnroll][NFC] Simplify recent block frequency tests (#177025)

Refactor a number of recent tests in
`llvm/test/Transforms/LoopUnroll/branch-weights-freq` to make it easier
to understand and extend them.

The changes mostly resemble the refactoring I recently did in PR #165635
in response to reviewer comments:
- For each case (e.g., each `-unroll-count` value in
`unroll-epilog.ll`), group all FileCheck directives together. That way,
while digesting a single case, the reader does not need to sift through
all other cases and a complex FileCheck prefix scheme.
- Reduce CFG testing. Drop many FileCheck directives that check for all
basic block labels and branches, and drop the cryptic
`-implicit-check-not` that excludes others. Instead, just use positive
checks for every loop body (represented by `call void @f`), for relevant
metadata, and for the branch instructions to which the metadata is
attached, and use simple negative checks (e.g.,
`-implicit-check-not='!prof'`) to be sure we have not missed any.
- Better document what the test intends to cover.

The result is sometimes longer tests due to comments and repetition, but
I believe they are easier to maintain this way.



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