* [PATCH] rs6000: fix for PR61396 (wide-int fallout)
@ 2014-07-22 5:17 Segher Boessenkool
2014-07-22 10:24 ` Mike Stump
0 siblings, 1 reply; 2+ messages in thread
From: Segher Boessenkool @ 2014-07-22 5:17 UTC (permalink / raw)
To: gcc-patches; +Cc: dje.gcc, Segher Boessenkool
CONSTANT_P is true for more than just all kinds of constant number.
This patch undoes that part of the wide-int patches.
Bootstrapped and tested on powerpc64-linux, -m64,-m32,-m32/-mpowerpc64.
No regressions (and the testcase mentioned in the PR is fixed, of course).
Okay to apply?
Segher
2014-07-21 Segher Boessenkool <segher@kernel.crashing.org>
gcc/
PR target/61396
* config/rs6000/rs6000.c (paired_expand_vector_init): Only allow
constant numbers, not general constants.
(rs6000_expand_vector_init): Ditto.
---
gcc/config/rs6000/rs6000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 4547ae5..682fe42 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5318,7 +5318,7 @@ paired_expand_vector_init (rtx target, rtx vals)
for (i = 0; i < n_elts; ++i)
{
x = XVECEXP (vals, 0, i);
- if (!CONSTANT_P (x))
+ if (!(CONST_SCALAR_INT_P (x) || CONST_DOUBLE_P (x) || CONST_FIXED_P (x)))
++n_var;
}
if (n_var == 0)
@@ -5470,7 +5470,7 @@ rs6000_expand_vector_init (rtx target, rtx vals)
for (i = 0; i < n_elts; ++i)
{
x = XVECEXP (vals, 0, i);
- if (!CONSTANT_P (x))
+ if (!(CONST_SCALAR_INT_P (x) || CONST_DOUBLE_P (x) || CONST_FIXED_P (x)))
++n_var, one_var = i;
else if (x != CONST0_RTX (inner_mode))
all_const_zero = false;
--
1.8.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] rs6000: fix for PR61396 (wide-int fallout)
2014-07-22 5:17 [PATCH] rs6000: fix for PR61396 (wide-int fallout) Segher Boessenkool
@ 2014-07-22 10:24 ` Mike Stump
0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 2014-07-22 10:24 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: gcc-patches, David Edelsohn
On Jul 21, 2014, at 9:43 PM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> CONSTANT_P is true for more than just all kinds of constant number.
> This patch undoes that part of the wide-int patches.
> Okay to apply?
Ok.
I’ve audited the rest of the wide-int patches to ensure that this was not repeated any place else, I didn’t find any other other than the two you found. Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-22 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22 5:17 [PATCH] rs6000: fix for PR61396 (wide-int fallout) Segher Boessenkool
2014-07-22 10:24 ` Mike Stump
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).