rs6000.md (define_split for bswaphi): Don't use zero_extract.
authorSegher Boessenkool <segher@kernel.crashing.org>
Tue, 12 May 2015 13:44:25 +0000 (15:44 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Tue, 12 May 2015 13:44:25 +0000 (15:44 +0200)
* config/rs6000/rs6000.md (define_split for bswaphi): Don't use
zero_extract.

From-SVN: r223069

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index f084795cda951516b411d1cab488a6b29d6c8f0b..4f7b7a10ed1f9fe2e005c40e136d49a4dc60e5af 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-12  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * config/rs6000/rs6000.md (define_split for bswaphi): Don't use
+       zero_extract.
+
 2015-05-12  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * combine.c (recog_for_combine_1): New function, factored out
index acf890cbdf4f72cf1d37d2fb91406b20be8fbba8..4bd16ee08152ca246b7a93931831a78cff9da4e0 100644 (file)
   [(set_attr "length" "4,4,12")
    (set_attr "type" "load,store,*")])
 
-;; We are always BITS_BIG_ENDIAN, so the (const_int 16) below is
-;; correct for -mlittle as well as -mbig.
 (define_split
   [(set (match_operand:HI 0 "gpc_reg_operand" "")
        (bswap:HI (match_operand:HI 1 "gpc_reg_operand" "")))
    (clobber (match_operand:SI 2 "gpc_reg_operand" ""))]
   "reload_completed"
   [(set (match_dup 3)
-       (zero_extract:SI (match_dup 4)
-                        (const_int 8)
-                        (const_int 16)))
+       (and:SI (lshiftrt:SI (match_dup 4)
+                            (const_int 8))
+               (const_int 255)))
    (set (match_dup 2)
        (and:SI (ashift:SI (match_dup 4)
                           (const_int 8))