From: Andreas Krebbel Date: Tue, 4 Dec 2012 14:04:39 +0000 (+0000) Subject: s390.c (s390_select_ccmode): Enable using CC of x + imm for higher immediates on... X-Git-Tag: releases/gcc-4.8.0~1589 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71ce1a34856faf6e981c68864004a4478bb220ce;p=thirdparty%2Fgcc.git s390.c (s390_select_ccmode): Enable using CC of x + imm for higher immediates on z9-109 upwards. 2012-12-04 Andreas Krebbel * config/s390/s390.c (s390_select_ccmode): Enable using CC of x + imm for higher immediates on z9-109 upwards. From-SVN: r194141 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bd208212555..077191ad6b1b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-12-04 Andreas Krebbel + + * config/s390/s390.c (s390_select_ccmode): Enable using CC of + x + imm for higher immediates on z9-109 upwards. + 2012-12-04 Richard Earnshaw * arm.opt (cirrus-fix-invalid-insns): Delete option. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 4ce1dc9542c4..6517bce15e0f 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -691,7 +691,10 @@ s390_select_ccmode (enum rtx_code code, rtx op0, rtx op1) int a, b; if ((b = a + c) > 0) with c as a constant value: c < 0 -> CCAN and c >= 0 -> CCAP */ if (GET_CODE (op0) == PLUS && GET_CODE (XEXP (op0, 1)) == CONST_INT - && CONST_OK_FOR_K (INTVAL (XEXP (op0, 1)))) + && (CONST_OK_FOR_K (INTVAL (XEXP (op0, 1))) + || (CONST_OK_FOR_CONSTRAINT_P (INTVAL (XEXP (op0, 1)), 'O', "Os") + /* Avoid INT32_MIN on 32 bit. */ + && (!TARGET_ZARCH || INTVAL (XEXP (op0, 1)) != -0x7fffffff - 1)))) { if (INTVAL (XEXP((op0), 1)) < 0) return CCANmode;