PR target/53110
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Apr 2012 19:40:31 +0000 (19:40 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Apr 2012 19:40:31 +0000 (19:40 +0000)
* 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/trunk@186839 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 820ba1b..a93d3cd 100644 (file)
@@ -1,3 +1,9 @@
+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-04-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR debug/52857
index 0b2fe55..60439f9 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")