This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix simd-2.c failure on powerpc
- From: Michael Matz <matz at suse dot de>
- To: Roger Sayle <roger at www dot eyesopen dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, Aldy Hernandex <aldyh at redhat dot com>,Geoff Keating <geoffk at geoffk dot org>,John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 10 Apr 2003 09:13:17 +0200 (CEST)
- Subject: Re: [PATCH] Fix simd-2.c failure on powerpc
Hi Roger,
On Wed, 9 Apr 2003, Roger Sayle wrote:
> The second and third operands of ZERO_EXTRACT should always be
> constant integers and therefore we only need to examine the
> first operand.
This is not true. It's not documented this way, and there are
counter-examples in GCC.
> The idiom of testing for ZERO_EXTRACT, SIGN_EXTRACT and
> STRICT_LOW_PART appears elsewhere in rtlanal.c,
If it checks only op0 of a ZERO_EXTRACT it usually is in functions which
only need to know if something is changed. Because op1 and op2 are
read-only there's no need to look at them. But look e.g. in df.c or in
function.c:fixup_var_refs_1(), where the CONST_INT'ness of op1/op2 is
explicitely tested.
Ciao,
Michael.