[llvm] LAA: don't speculate stride when BTC >= 0 (PR #96927)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 13:14:13 PDT 2024


https://github.com/nikic commented:

> Speculating the stride currently inserts a Stride == 1 predicate, which is equivalent to asserting that the that the loop executes atleast once.

Uh, how are these equivalent (or even related at all)?

> However, when the backedge-taken-count is known-non-negative, speculating the stride unnecessarily versions the loop. Avoid this.

The BE count is an unsigned quantity, so I don't get how "known-non-negative" can be meaningful for it.


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


More information about the llvm-commits mailing list