Oh. I see. Thank you so much for pointing this. Could you tell me what I should do in the codes? It seems that I should adjust it in vect_adjust_loop_lens_control muliply by some factor ? Is this correct multiply by max_nscalars_per_iter ? Thanks. juzhe.zhong@rivai.ai From: Richard Sandiford Date: 2023-05-24 23:47 To: 钟居哲 CC: gcc-patches; rguenther Subject: Re: [PATCH V14] VECT: Add decrement IV iteration loop control by variable amount support 钟居哲 writes: > Hi, Richard. I still don't understand it. Sorry about that. > >>> loop_len_48 = MIN_EXPR ; > >> _74 = loop_len_34 * 2 - loop_len_48; > > I have the tests already tested. > We have a MIN_EXPR to calculate the total elements: > loop_len_34 = MIN_EXPR ; > I think "8" is already multiplied by 2? > > Why do we need loop_len_34 * 2 ? > Could you give me more informations, The similiar tests you present we already have > execution check and passed. I am not sure whether this patch has the issue that I didn't notice. Think about the maximum values of each SSA name: loop_len_34 = MIN_EXPR ; // MAX 8 loop_len_48 = MIN_EXPR ; // MAX 4 _74 = loop_len_34 - loop_len_48; // MAX 4 loop_len_49 = MIN_EXPR <_74, 4>; // MAX 4 (always == _74) _75 = _74 - loop_len_49; // 0 loop_len_50 = MIN_EXPR <_75, 4>; // 0 loop_len_51 = _75 - loop_len_50; // 0 So the final two y vectors will always have 0 controls. Thanks, Richard