* config/sparc/sync.md: Add peephole for consecutive memory barriers.
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 29 Sep 2013 17:54:45 +0000 (17:54 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 29 Sep 2013 17:54:45 +0000 (17:54 +0000)
From-SVN: r203014

gcc/ChangeLog
gcc/config/sparc/sync.md

index b9eef9defa4042a82dd3b49b2a714146d82bf660..e208ae7dee35d8a46ba26e0cf27d31223eca3846 100644 (file)
@@ -1,3 +1,7 @@
+2013-09-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * config/sparc/sync.md: Add peephole for consecutive memory barriers.
+
 2013-09-28  Jan Hubicka  <jh@suse.cz>
 
        * config/i386/x86-tune.def: Add documentation for each of the options;
index 130f52191946d52b7175ee48cb5e03f09d11ba41..7b431bc65778b561167bad8f6a34332c79334a43 100644 (file)
   "membar\t%1"
   [(set_attr "type" "multi")])
 
+(define_peephole2
+  [(set (match_operand:BLK 0 "" "")
+       (unspec:BLK [(match_dup 0) (match_operand:SI 1 "const_int_operand")]
+                   UNSPEC_MEMBAR))
+   (set (match_operand:BLK 2 "" "")
+       (unspec:BLK [(match_dup 2) (match_operand:SI 3 "const_int_operand")]
+                   UNSPEC_MEMBAR))]
+  ""
+  [(set (match_operand:BLK 0 "" "")
+       (unspec:BLK [(match_dup 0) (match_dup 1)] UNSPEC_MEMBAR))]
+{ operands[1] = GEN_INT (UINTVAL (operands[1]) | UINTVAL (operands[3])); })
+
 (define_expand "atomic_load<mode>"
   [(match_operand:I 0 "register_operand" "")
    (match_operand:I 1 "memory_operand" "")