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

            Bug ID: 122987
           Summary: force_gimple_operand_gsi in tree-ssa-ifcombine.cc can
                    be replaced by gimple_build
           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: ---

```
      /* Do it.  */
      gsi = gsi_for_stmt (inner_cond);
      t = fold_build2 (LSHIFT_EXPR, TREE_TYPE (name1),
                       build_int_cst (TREE_TYPE (name1), 1), bit1);
      t2 = fold_build2 (LSHIFT_EXPR, TREE_TYPE (name1),
                        build_int_cst (TREE_TYPE (name1), 1), bit2);
      t = fold_build2 (BIT_IOR_EXPR, TREE_TYPE (name1), t, t2);
      t = force_gimple_operand_gsi (&gsi, t, true, NULL_TREE,
                                    true, GSI_SAME_STMT);
      t2 = fold_build2 (BIT_AND_EXPR, TREE_TYPE (name1), name1, t);
      t2 = force_gimple_operand_gsi (&gsi, t2, true, NULL_TREE,
                                     true, GSI_SAME_STMT);

```
Can be replaced by 4 gimple_build.
This might speed up the compiler slightly.

Reply via email to