[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 00:42:12 PST 2023
xiangzh1 wrote:
> > > And I think you need to precommit tests first.
Done
> > In fact, there is no direct/strong relation with stack cost, it mostly base on unroll or not (or other loop optimizations). Maybe we should check "unroll" info (e.g #pragma unroll, any targets with this hint should try best to unroll too) before do or not do this folding. A little trouble is loop info is not well established now.
>
> Yeah, it is a problem we unroll or not. But this case generally I believe we don't want to unroll it.
Update to handle unroll hint
Thanks for reviewing!
https://github.com/llvm/llvm-project/pull/74268
More information about the llvm-commits
mailing list