aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-11-23 11:10:53 -0700
committerJeff Law <law@gcc.gnu.org>2016-11-23 11:10:53 -0700
commit7d1f0a00ed3260561b9d79055acdd6ed42311cd3 (patch)
treef0fef41d67e454659b92efc13e9501bcb7d79c0f
parentcfe3d6538850d8e247995f2119b71f5dd04d1981 (diff)
downloadgcc-7d1f0a00ed3260561b9d79055acdd6ed42311cd3.zip
gcc-7d1f0a00ed3260561b9d79055acdd6ed42311cd3.tar.gz
gcc-7d1f0a00ed3260561b9d79055acdd6ed42311cd3.tar.bz2
iq2000.c (iq2000_rtx_costs): Avoid multiplication in boolean context warning.
* config/iq2000/iq2000.c (iq2000_rtx_costs): Avoid multiplication in boolean context warning. From-SVN: r242787
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/iq2000/iq2000.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index db002f7..b8a968e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -7,6 +7,9 @@
2016-11-23 Jeff Law <law@redhat.com>
+ * config/iq2000/iq2000.c (iq2000_rtx_costs): Avoid multiplication
+ in boolean context warning.
+
* config/ia64/ia64.c (ia64_emit_insn_before): Fix prototype.
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 2c936da4..a3195db 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -3309,7 +3309,7 @@ iq2000_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED,
int num_words = (GET_MODE_SIZE (mode) > UNITS_PER_WORD) ? 2 : 1;
if (simple_memory_operand (x, mode))
- return COSTS_N_INSNS (num_words);
+ return COSTS_N_INSNS (num_words) != 0;
* total = COSTS_N_INSNS (2 * num_words);
break;