From 9b054b08813d37586d6765fd087b0fc85dc94daf Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 13 Oct 2015 07:34:41 +0000 Subject: To... To: gcc-patches@gcc.gnu.org Subject: Add an extra pow rule to match.pd From: Richard Sandiford Gcc: private.sent --text follows this line-- Simplify pow(|x|,y) and pow(-x,y) to pow(x,y) if y is an even integer. At the moment this duplicates a case in fold_builtin_pow, but an upcoming patch will move all the fold_builtin_pow rules to match.pd. I'm doing this one early to fix a regression in builtin-10.c for soft-float ARM. gcc/ * real.h (real_isinteger): Declare. * real.c (real_isinteger): New function. * match.pd: Simplify pow(|x|,y) and pow(-x,y) to pow(x,y) if y is an even integer. From-SVN: r228750 --- gcc/real.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/real.h') diff --git a/gcc/real.h b/gcc/real.h index 706859b..e65b526 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -467,7 +467,8 @@ extern void real_round (REAL_VALUE_TYPE *, machine_mode, extern void real_copysign (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *); /* Check whether the real constant value given is an integer. */ -extern bool real_isinteger (const REAL_VALUE_TYPE *c, machine_mode mode); +extern bool real_isinteger (const REAL_VALUE_TYPE *, machine_mode); +extern bool real_isinteger (const REAL_VALUE_TYPE *, HOST_WIDE_INT *); /* Write into BUF the maximum representable finite floating-point number, (1 - b**-p) * b**emax for a given FP format FMT as a hex -- cgit v1.1