Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Richard Biener
On Mon, Jun 30, 2014 at 5:54 PM, Richard Henderson r...@redhat.com wrote: On 06/29/2014 11:14 AM, Uros Bizjak wrote: if (MEM_READONLY_P (x)) +if (GET_CODE (mem_addr) == AND) + return 1; return 0; Certainly missing braces here. But with that fixed the patch looks plausible.

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Richard Henderson
On 07/07/2014 02:10 AM, Richard Biener wrote: On Mon, Jun 30, 2014 at 5:54 PM, Richard Henderson r...@redhat.com wrote: On 06/29/2014 11:14 AM, Uros Bizjak wrote: if (MEM_READONLY_P (x)) +if (GET_CODE (mem_addr) == AND) + return 1; return 0; Certainly missing braces here.

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Richard Biener
On Mon, Jul 7, 2014 at 4:20 PM, Richard Henderson r...@redhat.com wrote: On 07/07/2014 02:10 AM, Richard Biener wrote: On Mon, Jun 30, 2014 at 5:54 PM, Richard Henderson r...@redhat.com wrote: On 06/29/2014 11:14 AM, Uros Bizjak wrote: if (MEM_READONLY_P (x)) +if (GET_CODE (mem_addr)

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Richard Biener
On Mon, Jul 7, 2014 at 4:34 PM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Jul 7, 2014 at 4:20 PM, Richard Henderson r...@redhat.com wrote: On 07/07/2014 02:10 AM, Richard Biener wrote: On Mon, Jun 30, 2014 at 5:54 PM, Richard Henderson r...@redhat.com wrote: On 06/29/2014 11:14

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Richard Henderson
On 07/07/2014 07:34 AM, Richard Biener wrote: Ugh. I wasn't aware of that - is this documented anywhere? What exactly does such address conflict with? Does it inhibit type-based analysis? Dunno if it's documented anywhere. Such addresses conflict with anything, unless it can be proven not

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Uros Bizjak
On Mon, Jul 7, 2014 at 5:01 PM, Richard Henderson r...@redhat.com wrote: Early alpha can't store sub-4-byte quantities. Altivec can't store anything but 16 byte quantities. In order to perform smaller stores, we have to do a read-modify-write sequence on a larger aligned chunk of memory.

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-07-07 Thread Richard Henderson
On 07/07/2014 09:35 AM, Uros Bizjak wrote: On Mon, Jul 7, 2014 at 5:01 PM, Richard Henderson r...@redhat.com wrote: Early alpha can't store sub-4-byte quantities. Altivec can't store anything but 16 byte quantities. In order to perform smaller stores, we have to do a read-modify-write

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-06-30 Thread Richard Henderson
On 06/29/2014 11:14 AM, Uros Bizjak wrote: if (MEM_READONLY_P (x)) +if (GET_CODE (mem_addr) == AND) + return 1; return 0; Certainly missing braces here. But with that fixed the patch looks plausible. I'll look at it closer later today. r~

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-06-30 Thread Uros Bizjak
On Mon, Jun 30, 2014 at 5:54 PM, Richard Henderson r...@redhat.com wrote: On 06/29/2014 11:14 AM, Uros Bizjak wrote: if (MEM_READONLY_P (x)) +if (GET_CODE (mem_addr) == AND) + return 1; return 0; Certainly missing braces here. But with that fixed the patch looks plausible.

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-06-29 Thread Uros Bizjak
On Fri, Jun 27, 2014 at 10:04 PM, Richard Henderson r...@redhat.com wrote: On 06/27/2014 10:04 AM, Uros Bizjak wrote: This happened due to the way stores to QImode and HImode locations are implemented on non-BWX targets. The sequence reads full word, does its magic to the part and stores the

[PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-06-27 Thread Uros Bizjak
Hello! The motivation for this patch was exposed miscompilation of gfortran on alpha that resulted in: FAIL: gfortran.dg/assumed_rank_3.f90:15.20: print *, ubound(x,dim=3) ! wrong dim 1 Error: Assumed-rank variable x at (1) may only be used as actual argument The

Re: [PATCH, alpha]: Wrap {un,}aligned_store sequence with memory blockages.

2014-06-27 Thread Richard Henderson
On 06/27/2014 10:04 AM, Uros Bizjak wrote: This happened due to the way stores to QImode and HImode locations are implemented on non-BWX targets. The sequence reads full word, does its magic to the part and stores the full word with changed part back to the memory. However - the scheduler