https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122989

            Bug ID: 122989
           Summary: some force_gimple_operand_gsi in tree-strlen.cc should
                    be replaced by gimple_build/gimple_convert
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: easyhack, internal-improvement
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

```
          if (!ptrofftype_p (TREE_TYPE (lhs)))
            {
              lhs = convert_to_ptrofftype (lhs);
              lhs = force_gimple_operand_gsi (&gsi, lhs, true, NULL_TREE,
                                              true, GSI_SAME_STMT);
            }
          lenstmt = gimple_build_assign
                        (make_ssa_name (TREE_TYPE (gimple_call_arg (stmt, 0))),
                         POINTER_PLUS_EXPR,tem, lhs);
          gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);
```
This could be using gimple_convert_to_ptrofftype and then gimple_build instead
of convert_to_ptrofftype/force_gimple_operand_gsi
/gimple_build_assign/gsi_insert_before .

Reply via email to