On Wed, Oct 28, 2020 at 8:24 PM Uros Bizjak <ubiz...@gmail.com> wrote:
>
> On Wed, Oct 28, 2020 at 10:54 AM Hongyu Wang <wwwhhhyyy...@gmail.com> wrote:
> >
> > Hi Uros,
> >
> > Thanks for the example. We've update the patterns with new expanders
> > and predicates like vzeroall.
> > Now the generated insn for "encodekey128u32"  is like
> >
> > (insn 7 6 8 2 (parallel [
> >             (set (reg:SI 84 [ <retval> ])
> >                 (unspec_volatile:SI [
> >                         (reg:SI 85)
> >                         (reg:V2DI 20 xmm0)
> >                     ] UNSPECV_ENCODEKEY128U32))
> >             (set (reg:V2DI 20 xmm0)
> >                 (unspec_volatile:V2DI [
> >                         (const_int 0 [0])
> >                     ] UNSPECV_ENCODEKEY128U32))
> >             (set (reg:V2DI 21 xmm1)
> >                 (unspec_volatile:V2DI [
> >                         (const_int 0 [0])
> >                     ] UNSPECV_ENCODEKEY128U32))
> >             (set (reg:V2DI 22 xmm2)
> >                 (unspec_volatile:V2DI [
> >                         (const_int 0 [0])
> >                     ] UNSPECV_ENCODEKEY128U32))
> >             (set (reg:V2DI 24 xmm4)
> >                 (const_vector:V2DI [
> >                         (const_int 0 [0]) repeated x2
> >                     ]))
> >             (set (reg:V2DI 25 xmm5)
> >                 (const_vector:V2DI [
> >                         (const_int 0 [0]) repeated x2
> >                     ]))
> >             (set (reg:V2DI 26 xmm6)
> >                 (const_vector:V2DI [
> >                         (const_int 0 [0]) repeated x2
> >                     ]))
> >             (clobber (reg:CC 17 flags))
> >
> > Rebased on 2020-10-27 trunk and update patch.
>
> Yes, this looks much better.
>
> +#define OPTION_MASK_ISA2_AVX2_UNSET OPTION_MASK_ISA2_AVX512F_UNSET
> +#define OPTION_MASK_ISA2_AVX_UNSET OPTION_MASK_ISA2_AVX2_UNSET
> +#define OPTION_MASK_ISA2_SSE4_2_UNSET OPTION_MASK_ISA2_AVX_UNSET
> +#define OPTION_MASK_ISA2_SSE4_1_UNSET OPTION_MASK_ISA2_SSE4_2_UNSET
> +#define OPTION_MASK_ISA2_SSE4_UNSET OPTION_MASK_ISA2_SSE4_1_UNSET
> +#define OPTION_MASK_ISA2_SSSE3_UNSET OPTION_MASK_ISA2_SSE4_1_UNSET
> +#define OPTION_MASK_ISA2_SSE3_UNSET OPTION_MASK_ISA2_SSSE3_UNSET
> +#define OPTION_MASK_ISA2_SSE2_UNSET \
> +  (OPTION_MASK_ISA2_SSE3_UNSET | OPTION_MASK_ISA2_KL_UNSET)
> +#define OPTION_MASK_ISA2_SSE_UNSET OPTION_MASK_ISA2_SSE2_UNSET
>
> is there a reason to introduce all these (with corresponding changes)?
> SSE options live in ISA bitmap, so it is kind of strange you need to
> handle them in ISA2 bitmap. Option handling is not exactly my area,
> please ask HJ to comment and review this part.
>
Sorry for the confusion.
ISA2 in OPTION_MASK_ISA2_SSE2_UNSET means the isas who are SET or
UNSET are in the ISA2 bitmap, similar for ISA in
OPTION_MASK_ISA_SSE_SET.

> Eventually, some option could be moved from ISA to ISA2 to accommodate
> KL options in ISA bitmap.
>

We already have avx512f in ISA bitmap, and other AVX512 ISAs in ISA2
bitmap. More importantly, we don't know the dependence of the future
isas, it could be an endless task to move one isa from one bitmap to
the other.


-- 
BR,
Hongtao

Reply via email to