[llvm] LAA: don't speculate stride when loop is known to execute (PR #96927)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 09:21:36 PDT 2024


fhahn wrote:

> Okay, so I've investigated this problem thoroughly (producing #97075 as a side-effect), and concluded that this entire stride-versioning thing done by LAA is a rough heuristic that can't change, since too many callers depend on it. To fix the regression, I propose that we patch LoopVersioning directly, and not touch LAA. Any thoughts?

Yeah, versioning loops with a single iteration is likely to not be profitable. Would be interesting to know who is calling LoopVersioning on such loops

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


More information about the llvm-commits mailing list