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

vekumar at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vekumar at gcc dot gnu.org

--- Comment #8 from vekumar at gcc dot gnu.org ---
There are 2 issues .

#issue1 
-mprfchw should be enabled only for targets that supports (3DNowprefetch).
On K8, 3DNowprefetch is not available and -march=k8 should not set this flag.

I can see behavior now corrected with Uros flag. 
Although I have to verify changes done other targets. 

#2 issue2
prefetchw ISA is also available in 3DNow!. Generating prefetchw by the GCC
backend is functionally correct if write prefetches are requested.

Looking at the test case why write prefetches are requested.

void f() {
    extern int size;
    int i;
    float * fvec;
    float * fptr = (float *) get();
    for(i = 0; i < size; ++i)
        fvec[i] = fptr[i];
    get();
}

I have to keep one more call statement so that "fvec" definition is not killed. 
prefetchw is generated for memory stores via fvec.  They are written only.

Reply via email to