Hi Jeff,

在 2023/7/21 5:27, Jeff Law 写道:
> Wouldn't it make more sense to just try rotate/mask in the original mode 
> before trying a shift in a widened mode?  I'm not sure why we need a target 
> hook here.

There is no change to try rotate/mask with the original mode when
expensive_optimizations is set. The subst widens the shift mode.

      if (flag_expensive_optimizations)
        {
          /* Pass pc_rtx so no substitutions are done, just
             simplifications.  */
          if (i1)
            {
              subst_low_luid = DF_INSN_LUID (i1);
              i1src = subst (i1src, pc_rtx, pc_rtx, 0, 0, 0);
            }

          subst_low_luid = DF_INSN_LUID (i2);
          i2src = subst (i2src, pc_rtx, pc_rtx, 0, 0, 0);
        }

I don't know if the wider mode is helpful to other targets, so
I added the target hook.

Thanks
Gui Haochen

Reply via email to