]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/commitdiff
PR target/53961
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Jul 2012 08:13:47 +0000 (08:13 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Jul 2012 08:13:47 +0000 (08:13 +0000)
Backport from mainline
2012-04-25  Jakub Jelinek  <jakub@redhat.com>

PR target/53110
* config/i386/i386.md (and<mode>3): For andq $0xffffffff, reg
instead expand it as zero extension.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189491 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index dd33beef41bbb2a991d12ee9f2cc09e31f7e0576..baea815d103da0e4817fc3ce2618d61ee84c3f52 100644 (file)
@@ -1,3 +1,14 @@
+2012-07-15  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/53961
+
+       Backport from mainline
+       2012-04-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/53110
+       * config/i386/i386.md (and<mode>3): For andq $0xffffffff, reg
+       instead expand it as zero extension.
+
 2012-07-14  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (QImode and HImode cmove splitters): Merge
index 7fc9b2f43b5bd87c832356557132e58e791cbf5e..37cea7939aed60e1cfb4076a61a0f9868418a67e 100644 (file)
        (and:SWIM (match_operand:SWIM 1 "nonimmediate_operand" "")
                  (match_operand:SWIM 2 "<general_szext_operand>" "")))]
   ""
-  "ix86_expand_binary_operator (AND, <MODE>mode, operands); DONE;")
+{
+  if (<MODE>mode == DImode
+      && GET_CODE (operands[2]) == CONST_INT
+      && INTVAL (operands[2]) == (HOST_WIDE_INT) 0xffffffff
+      && REG_P (operands[1]))
+    emit_insn (gen_zero_extendsidi2 (operands[0],
+                                    gen_lowpart (SImode, operands[1])));
+  else
+    ix86_expand_binary_operator (AND, <MODE>mode, operands);
+  DONE;
+})
 
 (define_insn "*anddi_1"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=r,rm,r,r")