From: rearnsha Date: Mon, 4 Apr 2005 10:51:38 +0000 (+0000) Subject: PR target/14812 X-Git-Tag: upstream/4.9.2~62436 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c9d8377250c1c426aae1a1989a33dded735f47e;p=platform%2Fupstream%2Flinaro-gcc.git PR target/14812 * arm.c (arm_select_cc_mode): Return CC_Zmode when comparing against a negated value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97533 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe589da..dd8d0b7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-04-04 Richard Earnshaw + + PR target/14812 + * arm.c (arm_select_cc_mode): Return CC_Zmode when comparing against + a negated value. + 2005-04-04 Richard Henderson Jakub Jelinek diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 83c5b85..bcf1904 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -6100,6 +6100,13 @@ arm_select_cc_mode (enum rtx_code op, rtx x, rtx y) || GET_CODE (x) == ROTATERT)) return CC_SWPmode; + /* This operation is performed swapped, but since we only rely on the Z + flag we don't need an additional mode. */ + if (GET_MODE (y) == SImode && REG_P (y) + && GET_CODE (x) == NEG + && (op == EQ || op == NE)) + return CC_Zmode; + /* This is a special case that is used by combine to allow a comparison of a shifted byte load to be split into a zero-extend followed by a comparison of the shifted integer (only valid for