[llvm] [LoopCacheAnalysis] Replace delinearization for fixed size array (PR #164798)
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 01:48:46 PST 2025
================
@@ -9,8 +9,8 @@
; A[c][d][d] = 0;
; }
-; CHECK: Loop 'outer.loop' has cost = 9223372036854775807
; CHECK: Loop 'inner.loop' has cost = 9223372036854775807
+; CHECK: Loop 'outer.loop' has cost = 10000
----------------
sjoerdmeijer wrote:
Sorry for the delay, thanks for the ping, this dropped off my radar.
Hmmm, yeah, this is a bit of an interesting test case change. This change reveals that the test is fragile: apparently the accuracy of the analysis has improved, and it is now able to more bound the cost a lot better. The result is a small cost value, which is not going to overflow. So, from that point of view, the test is no longer testing what it is supposed to test, i.e. it is saturating to UINT_MAX and it is able to hold value 9223372036854775807.
Again, that is a problem with the test, not this change. But just wondering if you'd already looked into the test by any chance. I.e., do you see an easy way to modify that test and keep the behaviour so that it is not able to cost the loop and keep this behaviour?
https://github.com/llvm/llvm-project/pull/164798
More information about the llvm-commits
mailing list