* i386.md (test patterns): Allow memory operand in operand1.
authorJan Hubicka <jh@suse.cz>
Tue, 1 Apr 2003 16:26:37 +0000 (18:26 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 1 Apr 2003 16:26:37 +0000 (16:26 +0000)
From-SVN: r65132

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

index 895acf4f97b06ef63bfe82127b1f3967b062b289..03b97444fde5d5d33c1fdec225e73e8c96203d8c 100644 (file)
@@ -1,3 +1,7 @@
+Tue Apr  1 18:18:23 CEST 2003  Jan Hubicka  <jh@suse.cz>
+
+       * i386.md (test patterns):  Allow memory operand in operand1.
+
 2003-02-31  Aldy Hernandez  <aldyh@redhat.com>
 
         * testsuite/gcc.c-torture/execute/simd-3.c: New.
index 78663dc37b20979645deae4c013124e932122c3b..0c5c127260186b6e94235e1eb107e2dbc630cb7d 100644 (file)
   [(set (reg 17)
        (compare
          (and:DI (match_operand:DI 0 "nonimmediate_operand" "%!*a,r,!*a,r,rm")
-                 (match_operand:DI 1 "x86_64_szext_nonmemory_operand" "Z,Z,e,e,re"))
+                 (match_operand:DI 1 "x86_64_szext_general_operand" "Z,Z,e,e,re"))
          (const_int 0)))]
-  "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
+  "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "@
    test{l}\t{%k1, %k0|%k0, %k1} 
    test{l}\t{%k1, %k0|%k0, %k1} 
   [(set (reg 17)
        (compare
          (and:SI (match_operand:SI 0 "nonimmediate_operand" "%!*a,r,rm")
-                 (match_operand:SI 1 "nonmemory_operand" "in,in,rin"))
+                 (match_operand:SI 1 "general_operand" "in,in,rin"))
          (const_int 0)))]
-  "ix86_match_ccmode (insn, CCNOmode)"
+  "ix86_match_ccmode (insn, CCNOmode)
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "test{l}\t{%1, %0|%0, %1}"
   [(set_attr "type" "test")
    (set_attr "modrm" "0,1,1")
 (define_insn "*testhi_1"
   [(set (reg 17)
         (compare (and:HI (match_operand:HI 0 "nonimmediate_operand" "%!*a,r,rm")
-                        (match_operand:HI 1 "nonmemory_operand" "n,n,rn"))
+                        (match_operand:HI 1 "general_operand" "n,n,rn"))
                 (const_int 0)))]
-  "ix86_match_ccmode (insn, CCNOmode)"
+  "ix86_match_ccmode (insn, CCNOmode)
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "test{w}\t{%1, %0|%0, %1}"
   [(set_attr "type" "test")
    (set_attr "modrm" "0,1,1")
 (define_insn "*testqi_1"
   [(set (reg 17)
         (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%!*a,q,qm,r")
-                        (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
+                        (match_operand:QI 1 "general_operand" "n,n,qn,n"))
                 (const_int 0)))]
-  "ix86_match_ccmode (insn, CCNOmode)"
+  "ix86_match_ccmode (insn, CCNOmode)
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
 {
   if (which_alternative == 3)
     {
              (const_int 8)
              (const_int 8))
            (zero_extend:SI
-             (match_operand:QI 1 "nonimmediate_operand" "Qm")))
+             (match_operand:QI 1 "general_operand" "Qm")))
          (const_int 0)))]
-  "!TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
+  "!TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "test{b}\t{%1, %h0|%h0, %1}"
   [(set_attr "type" "test")
    (set_attr "mode" "QI")])