[llvm] [AMDGPU] Add flag to enable expensive trip counts for runtime unroll. (PR #171735)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 10:46:40 PST 2025


================
@@ -124,6 +130,8 @@ void AMDGPUTTIImpl::getUnrollingPreferences(
   // We want to run unroll even for the loops which have been vectorized.
   UP.UnrollVectorizedLoop = true;
 
+  UP.AllowExpensiveTripCount = UnrollRuntimeExpensiveTripCount;
----------------
arsenm wrote:

Isn't there a generic flag that sets this in the unroll pass? The proliferation of target specific flags just to set an option in the backend implementation of some generic thing is not good 

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


More information about the llvm-commits mailing list