Patchwork [3/3] rs6000: Rewrite sync patterns for atomic; expand early.

login
register
mail settings
Submitter Richard Henderson
Date June 12, 2012, 3:51 p.m.
Message ID <4FD76567.2070506@redhat.com>
Download mbox | patch
Permalink /patch/164440/
State New
Headers show

Comments

Richard Henderson - June 12, 2012, 3:51 p.m.
On 2012-06-11 18:40, David Edelsohn wrote:
>> > Nope.  I do see the obvious mistake in the atomic_load pattern though:
>> > The mode iterator should have been INT1 not INT.
> Did you want to commit the fix for the iterator?
> 

Applied the following to mainline.

It ought to go onto the 4.7 branch as well, as it's a wrong-code bug.
Are we at a place in the 4.7.1 release process where that's possible?


r~
2012-06-12  Richard Henderson  <rth@redhat.com>

	* config/rs6000/sync.md (atomic_load, atomic_store): Use INT1 mode
	iterator instead of INT.
David Edelsohn - June 12, 2012, 11:14 p.m.
On Tue, Jun 12, 2012 at 11:51 AM, Richard Henderson <rth@redhat.com> wrote:
> On 2012-06-11 18:40, David Edelsohn wrote:
>>> > Nope.  I do see the obvious mistake in the atomic_load pattern though:
>>> > The mode iterator should have been INT1 not INT.
>> Did you want to commit the fix for the iterator?
>>
>
> Applied the following to mainline.
>
> It ought to go onto the 4.7 branch as well, as it's a wrong-code bug.
> Are we at a place in the 4.7.1 release process where that's possible?

I agree that it is an important bug, but I believe that Richi was
planning to announce the release any day now and the RC tarballs
already have been spun.

- David
Richard Guenther - June 13, 2012, 8:33 a.m.
On Tue, 12 Jun 2012, Richard Henderson wrote:

> On 2012-06-11 18:40, David Edelsohn wrote:
> >> > Nope.  I do see the obvious mistake in the atomic_load pattern though:
> >> > The mode iterator should have been INT1 not INT.
> > Did you want to commit the fix for the iterator?
> > 
> 
> Applied the following to mainline.
> 
> It ought to go onto the 4.7 branch as well, as it's a wrong-code bug.
> Are we at a place in the 4.7.1 release process where that's possible?

If you are sure it won't break anything go ahead (sooner than later
please).

Thanks,
Richard.
Richard Henderson - June 13, 2012, 3:30 p.m.
On 2012-06-13 01:33, Richard Guenther wrote:
> If you are sure it won't break anything go ahead (sooner than later please).

Done.


r~

Patch

diff --git a/gcc/config/rs6000/sync.md b/gcc/config/rs6000/sync.md
index d4848a8..5b79428 100644
--- a/gcc/config/rs6000/sync.md
+++ b/gcc/config/rs6000/sync.md
@@ -111,8 +111,8 @@ 
    (set_attr "length" "12")])
 
 (define_expand "atomic_load<mode>"
-  [(set (match_operand:INT 0 "register_operand" "")		;; output
-	(match_operand:INT 1 "memory_operand" ""))		;; memory
+  [(set (match_operand:INT1 0 "register_operand" "")		;; output
+	(match_operand:INT1 1 "memory_operand" ""))		;; memory
    (use (match_operand:SI 2 "const_int_operand" ""))]		;; model
   ""
 {
@@ -139,8 +139,8 @@ 
 })
 
 (define_expand "atomic_store<mode>"
-  [(set (match_operand:INT 0 "memory_operand" "")		;; memory
-	(match_operand:INT 1 "register_operand" ""))		;; input
+  [(set (match_operand:INT1 0 "memory_operand" "")		;; memory
+	(match_operand:INT1 1 "register_operand" ""))		;; input
    (use (match_operand:SI 2 "const_int_operand" ""))]		;; model
   ""
 {