[llvm] [polly] [delinearize] Extract array dimensions from alloca and global declarations (PR #156342)

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 11:25:23 PDT 2025


================
@@ -5,12 +5,13 @@
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.6.0"
 
+ at A.global = global [100 x [100 x i32]] zeroinitializer
 
 ;;  for (long int i = 0; i < 50; i++) {
 ;;    A[i][i] = i;
 ;;    *B++ = A[i + 10][i + 9];
 
-define void @couple0(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
+define void @couple0(ptr %B, i32 %n) nounwind uwtable ssp {
----------------
sebpop wrote:

I agree that patches should have minimal or no changes at all to the existing tests.  

However this is a patch out of a patch series.  Next patch #156215 in the series removes support for GEP-delinearize analysis. So in this context, the current patch modifies the testsuite such that there are no differences (WARN messages) between GEP-delinearize and the array_info-delinearize. With these minimal changes we can remove GEP-delinearize and keep all the tests.
Without changes to the testsuite, all those tests would regress by removing GEP-delinearize, and the tests would stop testing different other aspects of the compiler that they have been added to test (i.e., polly scheduling, DA tests, etc.) 

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


More information about the llvm-commits mailing list