This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39633] [avr] loop bug: missing 8-bit comparison (*cmpqi)
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Jul 2011 10:15:42 +0000
- Subject: [Bug target/39633] [avr] loop bug: missing 8-bit comparison (*cmpqi)
- Auto-submitted: auto-generated
- References: <bug-39633-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39633
--- Comment #11 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-10 10:15:11 UTC ---
It's bug in avr.c:notice_update_cc() because for shift offset=7 cc0 is set as
if it contained meaningful state:
case CC_CLOBBER:
/* Insn doesn't leave CC in a usable state. */
CC_STATUS_INIT;
/* Correct CC for the ashrqi3 with the shift count as CONST_INT != 6 */
set = single_set (insn);
if (set)
{
rtx src = SET_SRC (set);
if (GET_CODE (src) == ASHIFTRT
&& GET_MODE (src) == QImode)
{
rtx x = XEXP (src, 1);
if (GET_CODE (x) == CONST_INT
&& INTVAL (x) > 0
&& INTVAL (x) != 6)
{
cc_status.value1 = SET_DEST (set);
cc_status.flags |= CC_OVERFLOW_UNUSABLE;
}
}
}
break;