]> git.ipfire.org Git - thirdparty/gcc.git/commit
To: gcc-patches@gcc.gnu.org
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Oct 2015 07:34:41 +0000 (07:34 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Oct 2015 07:34:41 +0000 (07:34 +0000)
commita614e82cd860211a93c590363db1fa49239f396a
treece58f25ea3acb2f496d0e9a22bb891f6e38e668d
parent6ee64ac6f80b0fdd2fa880451193433da48a3644
To: gcc-patches@gcc.gnu.org
Subject: Add an extra pow rule to match.pd
From: Richard Sandiford <richard.sandiford@arm.com>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228750 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/match.pd
gcc/real.c
gcc/real.h