Commit 1cf7847f by Denis Chertykov Committed by Denis Chertykov

expmed.c (expand_divmod): For signed divide by 2, prefer a branch and fewer…

expmed.c (expand_divmod): For signed divide by 2, prefer a branch and fewer shifts if branches are very cheap.

	* expmed.c (expand_divmod): For signed divide by 2, prefer
	a branch and fewer shifts if branches are very cheap.

From-SVN: r37270
parent 099a5150
Sat Sep 23 19:10:20 2000 Denis Chertykov <denisc@overta.ru> & Marek Michalkiewicz <marekm@linux.org.pl>
* expmed.c (expand_divmod): For signed divide by 2, prefer
a branch and fewer shifts if branches are very cheap.
2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
* Makefile.in: Remove all targets related to building * Makefile.in: Remove all targets related to building
......
...@@ -3258,7 +3258,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) ...@@ -3258,7 +3258,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d)) else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d))
{ {
lgup = floor_log2 (abs_d); lgup = floor_log2 (abs_d);
if (abs_d != 2 && BRANCH_COST < 3) if (BRANCH_COST < 1 || (abs_d != 2 && BRANCH_COST < 3))
{ {
rtx label = gen_label_rtx (); rtx label = gen_label_rtx ();
rtx t1; rtx t1;
......
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