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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looking into the initialization code of TSVC code:

    real_t any=0.;
    int frac = SET1D_RECIP_IDX;


if (!strcmp(name, "s258")) {
        set_1d_array(a, LEN_1D, any,frac);
        set_1d_array(b, LEN_1D,zero,unit);
        set_1d_array(c, LEN_1D, any,frac);
        set_1d_array(d, LEN_1D, any,frac);
        set_1d_array(e, LEN_1D,zero,unit);
        set_2d_array(aa, any,frac);
    }



    if (stride == SET1D_RECIP_IDX) {
        for (int i = 0; i < length; i++) {
            arr[i] = 1. / (real_t) (i+1);
        }


This is definitely a bad benchmarking.
because `         if (a[i] > 0.)` is always true so spliting the path here is
cheats and was an accident it was happening in the first place

I am going to try one more thing of changing the benchmark to use both positive
and negative numbers. But I am suspecting this is just a bad benchmark.

That is change:

        for (int i = 0; i < length; i++) {
            arr[i] = 1. / (real_t) (i+1);
        }

to be something like:

        for (int i = 0; i < length; i++) {
            arr[i] = 1. / (real_t) (i+1) * -(i&1);
        }

Reply via email to