i386.md (and<mode>3): Change runtime operand mode checks to compile-time "mode =...
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 30 Apr 2012 17:12:42 +0000 (19:12 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 30 Apr 2012 17:12:42 +0000 (19:12 +0200)
* config/i386/i386.md (and<mode>3): Change runtime operand mode checks
to compile-time "mode == <MODE>mode" checks.
(and splitter): Ditto.

From-SVN: r186993

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

index ea032c11afca9971e3392eb3e24645276f54e805..5e7dadfbfc4c2e6297d44b729cd7632ca5b4782d 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-30  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (and<mode>3): Change runtime operand mode checks
+       to compile-time "mode == <MODE>mode" checks.
+       (and splitter): Ditto.
+
 2012-04-30  Richard Henderson  <rth@redhat.com>
 
        * config/arm/arm.md (UNSPEC_LL): New.
@@ -40,7 +46,7 @@
        * config/arm/arm-protos.h (ldm_stm_operation_p): New parameters.
        * config/arm/arm.c (ldm_stm_operation_p): New parameters.
        * config/arm/predicates.md (load_multiple_operation): Add arguments.
-       (store_multiple_operation): Likewise.   
+       (store_multiple_operation): Likewise.
 
 2012-04-30  Uros Bizjak  <ubizjak@gmail.com>
 
index c98efaa933a030b24a58076972935001a6f759c7..9047a31a01bd68ad5cb6846f8f5fefd250971d54 100644 (file)
                  (match_operand:SWIM 2 "<general_szext_operand>")))]
   ""
 {
-  enum machine_mode mode = GET_MODE (operands[1]);
+  enum machine_mode mode = <MODE>mode;
   rtx (*insn) (rtx, rtx);
 
   if (CONST_INT_P (operands[2]) && REG_P (operands[0]))
        mode = QImode;
       }
 
-  if (mode == GET_MODE (operands[1]))
+  if (mode == <MODE>mode)
     {
       ix86_expand_binary_operator (AND, <MODE>mode, operands);
       DONE;
     }
 
-  operands[1] = gen_lowpart (mode, operands[1]);
-
-  if (GET_MODE (operands[0]) == DImode)
+  if (<MODE>mode == DImode)
     insn = (mode == SImode)
           ? gen_zero_extendsidi2
           : (mode == HImode)
           ? gen_zero_extendhidi2
           : gen_zero_extendqidi2;
-  else if (GET_MODE (operands[0]) == SImode)
+  else if (<MODE>mode == SImode)
     insn = (mode == HImode)
           ? gen_zero_extendhisi2
           : gen_zero_extendqisi2;
-  else if (GET_MODE (operands[0]) == HImode)
+  else if (<MODE>mode == HImode)
     insn = gen_zero_extendqihi2;
   else
     gcc_unreachable ();
 
-  emit_insn (insn (operands[0], operands[1]));
+  emit_insn (insn (operands[0], gen_lowpart (mode, operands[1])));
   DONE;
 })
 
       mode = QImode;
     }
 
-  operands[1] = gen_lowpart (mode, operands[1]);
-
-  if (GET_MODE (operands[0]) == DImode)
+  if (<MODE>mode == DImode)
     insn = (mode == SImode)
           ? gen_zero_extendsidi2
           : (mode == HImode)
           : gen_zero_extendqidi2;
   else
     {
-      /* Zero extend to SImode to avoid partial register stalls.  */
-      operands[0] = gen_lowpart (SImode, operands[0]);
+      if (<MODE>mode != SImode)
+       /* Zero extend to SImode to avoid partial register stalls.  */
+       operands[0] = gen_lowpart (SImode, operands[0]);
 
       insn = (mode == HImode)
             ? gen_zero_extendhisi2
             : gen_zero_extendqisi2;
     }
-  emit_insn (insn (operands[0], operands[1]));
+  emit_insn (insn (operands[0], gen_lowpart (mode, operands[1])));
   DONE;
 })