On 4/16/19 10:29 AM, Steve Ellcey wrote:
> Re-ping.  I know there are discussions about bigger changes to fix the
> various failures listed in PR rtl-optimization/87763 but this patch
> at least fixes one of them (gcc.target/aarch64/lsl_asr_sbfiz.c).
So I think we can address this by making the extv/extzv expander handle
both modes just like we do for insv.    That's cleaner than addding new
patterns to match the subreg nonsense IMHO.

Something like this:

> (define_expand "<optab><mode>"
>   [(set (match_operand:GPI 0 "register_operand" "=r")
>         (ANY_EXTRACT:GPI (match_operand:GPI 1 "register_operand")
>                         (match_operand 2
>                           "aarch64_simd_shift_imm_offset_<mode>")
>                         (match_operand 3 "aarch64_simd_shift_imm_<mode>")))]
>   ""
>   {
>     if (!IN_RANGE (INTVAL (operands[2]) + INTVAL (operands[3]),
>                    1, GET_MODE_BITSIZE (<MODE>mode) - 1))
>      FAIL;
>   }
> )

Note how we're using <mode>, <MODE> and the GPI iterator.  With that
updated expander I get:

sbfiz32:
        sbfiz   w0, w0, 19, 3   // 12   [c=8 l=4]  *ashiftsi_extv_bfiz
        ret             // 21   [c=0 l=4]  *do_return


and

sbfiz64:
        sbfiz   x0, x0, 38, 6   // 12   [c=8 l=4]  *ashiftdi_extv_bfiz
        ret             // 21   [c=0 l=4]  *do_return


I'm going to throw that into the tester and see what we get...

jeff

Reply via email to