combine.c (simplify_if_then_else): (IF_THEN_ELSE (NE REG 0) (0) (8)) is REG for nonzero_bits (REG) == 8.

* combine.c (simplify_if_then_else): (IF_THEN_ELSE (NE REG 0) (0) (8))
	is REG for nonzero_bits (REG) == 8.

From-SVN: r67488
This commit is contained in:
Jan Hubicka 2003-06-05 15:00:14 +02:00 committed by Jan Hubicka
parent 6262f66a0b
commit 83588a9d9d
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Thu Jun 5 14:59:44 CEST 2003 Jan Hubicka <jh@suse.cz>
* combine.c (simplify_if_then_else): (IF_THEN_ELSE (NE REG 0) (0) (8))
is REG for nonzero_bits (REG) == 8.
Thu Jun 5 13:23:51 CEST 2003 Jan Hubicka <jh@suse.cz>
* i386.md (align): Fix warning; clarify what to do when no p2align

View File

@ -5049,6 +5049,14 @@ simplify_if_then_else (x)
simplify_shift_const (NULL_RTX, ASHIFT, mode,
gen_lowpart_for_combine (mode, XEXP (cond, 0)), i);
/* (IF_THEN_ELSE (NE REG 0) (0) (8)) is REG for nonzero_bits (REG) == 8. */
if (true_code == NE && XEXP (cond, 1) == const0_rtx
&& false_rtx == const0_rtx && GET_CODE (true_rtx) == CONST_INT
&& (INTVAL (true_rtx) & GET_MODE_MASK (mode))
== nonzero_bits (XEXP (cond, 0), mode)
&& (i = exact_log2 (INTVAL (true_rtx) & GET_MODE_MASK (mode))) >= 0)
return XEXP (cond, 0);
return x;
}