From: Jan Hubicka Date: Tue, 1 Apr 2003 16:26:37 +0000 (+0200) Subject: * i386.md (test patterns): Allow memory operand in operand1. X-Git-Tag: releases/gcc-3.4.0~7538 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1fea6ee0bc2ff70d07e79ab9cf0f545b5ba6b72;p=thirdparty%2Fgcc.git * i386.md (test patterns): Allow memory operand in operand1. From-SVN: r65132 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 895acf4f97b0..03b97444fde5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Apr 1 18:18:23 CEST 2003 Jan Hubicka + + * i386.md (test patterns): Allow memory operand in operand1. + 2003-02-31 Aldy Hernandez * testsuite/gcc.c-torture/execute/simd-3.c: New. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 78663dc37b20..0c5c12726018 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -8074,9 +8074,10 @@ [(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} @@ -8092,9 +8093,10 @@ [(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") @@ -8113,9 +8115,10 @@ (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") @@ -8133,9 +8136,10 @@ (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) { @@ -8190,9 +8194,10 @@ (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")])