From 2e204c1208737e96130449b8c480021282d61f77 Mon Sep 17 00:00:00 2001 From: uweigand Date: Wed, 14 Dec 2005 16:11:14 +0000 Subject: [PATCH] 2005-12-14 Adrian Straetling * config/s390/s390.md ("*tstdi_extimm", "*tstsi_extimm"): Merge. ("*tstdi_cconly_extimm", "*tstsi_cconly_extimm"): Merge. ("*tstdi_cconly2", "*tstsi_cconly2"): Merge. Move other tst* patterns to retain partial order. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108517 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 ++++ gcc/config/s390/s390.md | 97 ++++++++++++++++++------------------------------- 2 files changed, 43 insertions(+), 61 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a50c1e325b5..a86c2a27f8a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2005-12-14 Adrian Straetling + * config/s390/s390.md ("*tstdi_extimm", "*tstsi_extimm"): Merge. + ("*tstdi_cconly_extimm", "*tstsi_cconly_extimm"): Merge. + ("*tstdi_cconly2", "*tstsi_cconly2"): Merge. + Move other tst* patterns to retain partial order. + +2005-12-14 Adrian Straetling + * config/s390/s390.md ("d0", "1"): New mode attributes. ("di3", "si3"): Merge. ("*di3_and", "*si3_and"): Merge. diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 274c2336edd..d4e515c50e8 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -430,7 +430,11 @@ [(set_attr "op_type" "RI")]) +; ; Load-and-Test instructions +; + +; tst(di|si) intruction pattern(s). (define_insn "*tstdi_sign" [(set (reg CC_REGNUM) @@ -443,28 +447,28 @@ "ltgfr\t%2,%0" [(set_attr "op_type" "RRE")]) -(define_insn "*tstdi_extimm" +(define_insn "*tst_extimm" [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "nonimmediate_operand" "d,m") - (match_operand:DI 1 "const0_operand" ""))) - (set (match_operand:DI 2 "register_operand" "=d,d") + (compare (match_operand:GPR 0 "nonimmediate_operand" "d,m") + (match_operand:GPR 1 "const0_operand" ""))) + (set (match_operand:GPR 2 "register_operand" "=d,d") (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT && TARGET_EXTIMM" + "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" "@ - ltgr\t%2,%0 - ltg\t%2,%0" - [(set_attr "op_type" "RRE,RXY")]) + ltr\t%2,%0 + lt\t%2,%0" + [(set_attr "op_type" "RR,RXY")]) -(define_insn "*tstdi_cconly_extimm" +(define_insn "*tst_cconly_extimm" [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "nonimmediate_operand" "d,m") - (match_operand:DI 1 "const0_operand" ""))) - (clobber (match_scratch:DI 2 "=X,d"))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT && TARGET_EXTIMM" + (compare (match_operand:GPR 0 "nonimmediate_operand" "d,m") + (match_operand:GPR 1 "const0_operand" ""))) + (clobber (match_scratch:GPR 2 "=X,d"))] + "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" "@ - ltgr\t%0,%0 - ltg\t%2,%0" - [(set_attr "op_type" "RRE,RXY")]) + ltr\t%0,%0 + lt\t%2,%0" + [(set_attr "op_type" "RR,RXY")]) (define_insn "*tstdi" [(set (reg CC_REGNUM) @@ -476,46 +480,6 @@ "ltgr\t%2,%0" [(set_attr "op_type" "RRE")]) -(define_insn "*tstdi_cconly" - [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "register_operand" "d") - (match_operand:DI 1 "const0_operand" "")))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" - "ltgr\t%0,%0" - [(set_attr "op_type" "RRE")]) - -(define_insn "*tstdi_cconly_31" - [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "register_operand" "d") - (match_operand:DI 1 "const0_operand" "")))] - "s390_match_ccmode(insn, CCSmode) && !TARGET_64BIT" - "srda\t%0,0" - [(set_attr "op_type" "RS") - (set_attr "atype" "reg")]) - -(define_insn "*tstsi_extimm" - [(set (reg CC_REGNUM) - (compare (match_operand:SI 0 "nonimmediate_operand" "d,m") - (match_operand:SI 1 "const0_operand" ""))) - (set (match_operand:SI 2 "register_operand" "=d,d") - (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" - "@ - ltr\t%2,%0 - lt\t%2,%0" - [(set_attr "op_type" "RR,RXY")]) - -(define_insn "*tstsi_cconly_extimm" - [(set (reg CC_REGNUM) - (compare (match_operand:SI 0 "nonimmediate_operand" "d,m") - (match_operand:SI 1 "const0_operand" ""))) - (clobber (match_scratch:SI 2 "=X,d"))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" - "@ - ltr\t%0,%0 - lt\t%2,%0" - [(set_attr "op_type" "RR,RXY")]) - (define_insn "*tstsi" [(set (reg CC_REGNUM) (compare (match_operand:SI 0 "nonimmediate_operand" "d,Q,S") @@ -541,13 +505,24 @@ icmy\t%2,15,%S0" [(set_attr "op_type" "RR,RS,RSY")]) -(define_insn "*tstsi_cconly2" +(define_insn "*tstdi_cconly_31" + [(set (reg CC_REGNUM) + (compare (match_operand:DI 0 "register_operand" "d") + (match_operand:DI 1 "const0_operand" "")))] + "s390_match_ccmode(insn, CCSmode) && !TARGET_64BIT" + "srda\t%0,0" + [(set_attr "op_type" "RS") + (set_attr "atype" "reg")]) + +(define_insn "*tst_cconly2" [(set (reg CC_REGNUM) - (compare (match_operand:SI 0 "register_operand" "d") - (match_operand:SI 1 "const0_operand" "")))] + (compare (match_operand:GPR 0 "register_operand" "d") + (match_operand:GPR 1 "const0_operand" "")))] "s390_match_ccmode(insn, CCSmode)" - "ltr\t%0,%0" - [(set_attr "op_type" "RR")]) + "ltr\t%0,%0" + [(set_attr "op_type" "RR")]) + +; tst(hi|qi) intruction pattern(s). (define_insn "*tstCCT" [(set (reg CC_REGNUM) -- 2.11.0