This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix Ada comparison failure on SPARC
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Sandiford <richard dot sandiford at arm dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Sun, 11 Aug 2019 12:20:31 +0200
- Subject: Re: Fix Ada comparison failure on SPARC
- References: <yddef1sovkt.fsf@CeBiTec.Uni-Bielefeld.DE>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Aug 11, 2019 at 12:17:06PM +0200, Rainer Orth wrote:
> 2019-08-07 Richard Sandiford <richard.sandiford@arm.com>
>
> * data-streamer.h (streamer_write_poly_uint64): Declare.
> (streamer_read_poly_uint64): Likewise.
> * data-streamer-in.c (streamer_read_poly_uint64): New function.
> * data-streamer-out.c (streamer_write_poly_uint64): Likewise.
> * ipa-predicate.h (condition::size): Turn into a poly_int64.
> (add_condition): Take a poly_int64 size.
> * ipa-predicate.c (add_condition): Likewise.
> [...]
>
> Looking through it, I noticed this snippet
>
> diff --git a/gcc/ipa-predicate.c b/gcc/ipa-predicate.c
> --- a/gcc/ipa-predicate.c
> +++ b/gcc/ipa-predicate.c
> @@ -549,7 +549,7 @@ add_condition (class ipa_fn_summary *sum
> for (i = 0; vec_safe_iterate (summary->conds, i, &c); i++)
> {
> if (c->operand_num == operand_num
> - && c->size == size
> + && maybe_ne (c->size, size)
>
>
> where changing == to maybe_ne didn't seem right. And indeed changing it
> to maybe_eq as in the following patch fixed the comparison failure.
Shouldn't that be known_eq instead? Of course, it could make a difference
right now solely on aarch64 SVE.
Jakub