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;

Reply via email to