On 25 April 2023 18:58:10 CEST, Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: >juzhe.zh...@rivai.ai writes: >> diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc >> index 6e81dc05e0e..5f44def90d3 100644
>> diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc >> index a52277abdbf..54845a62298 100644 >> --- a/gcc/tree-ssa-loop-manip.cc >> +++ b/gcc/tree-ssa-loop-manip.cc >> @@ -59,14 +59,14 @@ static bitmap_obstack loop_renamer_obstack; >> void >> create_iv (tree base, tree step, tree var, class loop *loop, >> gimple_stmt_iterator *incr_pos, bool after, >> - tree *var_before, tree *var_after) >> + tree *var_before, tree *var_after, enum tree_code code) > >The comment needs to be updated to describe the new interface. Just cosmetics, but please omit the redundant "enum". > >This is personal preference, but: I think the interface would be >clearer if the code argument came between the base and step, >so that the order matches a SCEV. The code could no longer be >a default argument, and so all callers would need to be updated, >but IMO that's OK. Not sure what others think though. > >> { >> gassign *stmt; >> gphi *phi; >> tree initial, step1; >> gimple_seq stmts; >> tree vb, va; >> - enum tree_code incr_op = PLUS_EXPR; >> + enum tree_code incr_op = code; Likewise here. If you touch such lines, please omit the redundant "enum". I don't have an opinion on the patch itself. thanks,