Handle output of CC_ZnNmode.
("*b<nzcond:code>_reversed<mode>"): Ditto.
+ * config/cris/cris.c (cris_select_cc_mode): Return CC_NZmode for
+ NEG too. Correct comment.
+ * config/cris/cris.md ("<anz>neg<mode>2<setnz>"): Rename from
+ "neg<mode>2".
+
2020-05-08 Vladimir Makarov <vmakarov@redhat.com>
* ira-color.c (update_costs_from_allocno): Remove
return CCmode;
/* If we have a comparison that doesn't have to look at V or C, check
- operand x; if it looks like a binary operator, return CC_NZmode,
- else CCmode, so we only use CC_NZmode for the cases where we don't
- actually have both V and C valid. */
+ operand x; if it's a valid operator, return CC_NZmode, else CCmode,
+ so we only use CC_NZmode for the cases where we don't actually have
+ both V and C valid. */
if (op == EQ || op == NE || op == GTU || op == LEU
|| op == LT || op == GE)
{
/* Mentioning the rtx_code here is required but not sufficient: the
insn also needs to be decorated with <setnz> (and the
anonymization prefix <anz> for a named pattern). */
- return e == PLUS || e == MINUS || e == MULT || e == NOT
+ return e == PLUS || e == MINUS || e == MULT || e == NOT || e == NEG
? CC_NZmode : CCmode;
}
;; No "negdi2" although we could make one up that may be faster than
;; the one in libgcc.
-(define_insn "neg<mode>2"
+(define_insn "<anz>neg<mode>2<setnz>"
[(set (match_operand:BWD 0 "register_operand" "=r")
(neg:BWD (match_operand:BWD 1 "register_operand" "r")))
(clobber (reg:CC CRIS_CC0_REGNUM))]