> Ok, I have that fixed locally at the place of the patch but I wonder if > initial_condition () shouldn't return for example > > 1ul for (unsigned long) { 1, +, 1 }_1 >
This is correct. > and > > (int) i_2 for (int) { i_2, +, 1 }_1 > > and further (for short i_2) > > i_2 for (short) { (int) { i_2, +, 1 }_2, +, 1 }_1 > > ? Can the latter two happen all? Yes, these could happen, and you are right, we should see the initial value of a chrec through the type conversion lenses. > Is it even correct to talk about a > general initial condition in this case? Consider > > { { 1, +, 1 }_2, +, 1 }_1 > > initial_condition will return 1 for the chrec even though that is not > correct because the initial condition is not constant in loop 1. If you want, there is an initial condition for the loop_1 and that would be {1, +, 1}_2, and there is an initial condition 1 for loop nest loop_2: loop_2 i = loop_2_phi (0, i+1) = {1, +, 1}_2 loop_1 j = loop_1_phi (i, j+1) = {{1, +, 1}_2, +, 1}_1 > I suppose I'd only see that if instantiating the chrec at the point > where I placed the fix? So I really only see at most a single outer > conversion around the chrec? Yes, I think that at most you can have only one conversion around a chrec.