Commit 83588a9d by Jan Hubicka Committed by Jan Hubicka

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

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
parent 6262f66a
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> 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 * i386.md (align): Fix warning; clarify what to do when no p2align
......
...@@ -5049,6 +5049,14 @@ simplify_if_then_else (x) ...@@ -5049,6 +5049,14 @@ simplify_if_then_else (x)
simplify_shift_const (NULL_RTX, ASHIFT, mode, simplify_shift_const (NULL_RTX, ASHIFT, mode,
gen_lowpart_for_combine (mode, XEXP (cond, 0)), i); 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; return x;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment