Hi All,

This crash in Dependency analysis is because we assume here that in case of UsefulGEP both source and destination have the same number of operands which may not be true. This incorrect assumption results in crash while populating Pairs. Fix the same.

Consider the case -

struct s{ int A[10][10]; int C[10][10][10]; } S; void dep_constraint_crash_test(int k,int N) { for( int i=0;i<N;i++) for( int j=0;j<N;j++) S.A[0][0] = S.C[0][0][k]; }

In this case the GEP corresponding to store has 2 operands and that corresponding to load has 3 operands. This was resulting in a crash during dependency analysis.

Please let me know your inputs on the patch.

Thanks and Regards

Karthik Bhat