re PR target/50356 (Poor if condition in h8300 config code)

* PR target/50356
	* config/h8300/h8300.c (h8300_rtx_costs): Fix typo in CONST_INT case.

From-SVN: r192103
This commit is contained in:
Jeff Law 2012-10-04 14:58:30 -06:00 committed by Jeff Law
parent 068ef6d10d
commit 358a11bba1
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-10-04 Jeff Law <law@redhat.com>
* PR target/50356
* config/h8300/h8300.c (h8300_rtx_costs): Fix typo in CONST_INT case.
2012-10-04 Jason Merrill <jason@redhat.com>
* config/rs6000/rs6000.c (rs6000_code_end): Protect the use of

View File

@ -1,6 +1,6 @@
/* Subroutines for insn-output.c for Renesas H8/300.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com),
Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@ -1244,7 +1244,7 @@ h8300_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
*total = 0;
return true;
}
if (-4 <= n || n <= 4)
if (-4 <= n && n <= 4)
{
switch ((int) n)
{