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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-22
          Component|middle-end                  |target
     Ever confirmed|0                           |1

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
The following seems to fix the issue:

Index: gcc/config/sh/sh.md
===================================================================
--- gcc/config/sh/sh.md    (revision 220892)
+++ gcc/config/sh/sh.md    (working copy)
@@ -6218,7 +6218,7 @@
 (define_insn "swapbsi2"
   [(set (match_operand:SI 0 "arith_reg_dest" "=r")
     (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "r")
-            (const_int 4294901760))
+            (const_int -65536)) ;; 0xFFFF0000
         (ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
                 (const_int 65280))
             (and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
@@ -6286,7 +6286,7 @@
 (define_peephole2
   [(set (match_operand:SI 0 "arith_reg_dest" "")
     (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "")
-            (const_int 4294901760))
+            (const_int -65536)) ;; 0xFFFF0000
         (ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
                 (const_int 65280))
             (and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
@@ -6296,7 +6296,7 @@
   "TARGET_SH1 && peep2_reg_dead_p (2, operands[0])"
   [(set (match_dup 2)
     (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "")
-            (const_int 4294901760))
+            (const_int -65536)) ;; 0xFFFF0000
         (ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
                 (const_int 65280))
             (and:SI (ashiftrt:SI (match_dup 1) (const_int 8))

Reply via email to