diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54b55a66939..0ac8c420025 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-06-01 Roger Sayle + John David Anglin + Geoffrey Keating + + * emit-rtl.c (gen_lowpart_common): Handle interpreting integer + constants as condition code values. + 2003-06-01 DJ Delorie * cppmacro.c (warn_of_redefinition): Handle cases where the two diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 1bb79dd0aa4..8004cfb9e08 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1291,6 +1291,12 @@ gen_lowpart_common (mode, x) mode); #endif } + /* If MODE is a condition code and X is a CONST_INT, the value of X + must already have been "recognized" by the back-end, and we can + assume that it is valid for this mode. */ + else if (GET_MODE_CLASS (mode) == MODE_CC + && GET_CODE (x) == CONST_INT) + return x; /* Otherwise, we can't do this. */ return 0;