On Thu, Apr 29, 2021 at 9:25 AM Richard Biener <rguent...@suse.de> wrote:

> > > It eventually runs into the gcc_unreachable () at the very end of
> > > ix86_expand_builtin since IX86_BUILTIN_MASKLOADD and friends are
> > > no longer in the range of IX86_BUILTIN__BDESC_SPECIAL_ARGS_FIRST
> > > to IX86_BUILTIN__BDESC_SPECIAL_ARGS_LAST.
> >
> > How about the attached (untested) patch then?
>
> Ah yeah - good idea.
>
> The patch works, bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> As expected it reduces the number of masked load builtins for the
> PR99912 testcase from ~800 to ~350 (at the GIMPLE level).

Thanks, pushed with the following ChangeLog:

i386: Mark x86 masked load builtins pure [PR100312]

Mark x86 AVX and AVX2 masked load builtins pure to enable dead code
elimination and more appropriate alias analysis.

2021-04-29  Uroš Bizjak  <ubiz...@gmail.com>
        Richard Biener  <rguent...@suse.de>
gcc/
    PR target/100312
    * config/i386/i386-builtin.def (IX86_BUILTIN_MASKLOADPD)
    (IX86_BUILTIN_MASKLOADPS, IX86_BUILTIN_MASKLOADPD256)
    (IX86_BUILTIN_MASKLOADPS256, IX86_BUILTIN_MASKLOADD)
    (IX86_BUILTIN_MASKLOADQ, IX86_BUILTIN_MASKLOADD256)
    (IX86_BUILTIN_MASKLOADQ256): Move from SPECIAL_ARGS
    to PURE_ARGS category.
    * config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins):
    Handle PURE_ARGS category.
    * config/i386/i386-expand.c (ix86_expand_builtin): Ditto.

Uros.


> Thanks,
> Richard.

Reply via email to