This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rtlanal: Fix bits/bytes confusion in set_noop_p (PR68814)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Dec 2015 17:33:33 -0600
- Subject: Re: [PATCH] rtlanal: Fix bits/bytes confusion in set_noop_p (PR68814)
- Authentication-results: sourceware.org; auth=none
- References: <99c482971a4e6d16ff4bfe3b77bb1b890c73545b dot 1449691897 dot git dot segher at kernel dot crashing dot org> <2163477 dot O4gLdghSJq at polaris> <20151209221221 dot GA2093 at gate dot crashing dot org> <9120858 dot 18K3Ae22Vv at polaris>
On Thu, Dec 10, 2015 at 01:26:06PM +0100, Eric Botcazou wrote:
> Thanks. It seems a little odd for the condition to test the POS (operand #2)
> and not also the LEN (operand #1) of the ZERO_EXTRACT before returning true,
> but I'm not sure what the test would be given the above example. Or maybe
> it's implicitly contained in the POS test because of the little-endian case.
The test looks weird because it only handles the LE case. What it says
is simply "if copying the rightmost part of a register to itself", and
it then does not matter how many bits are copied.
This really does not belong here I'd say (whatever creates this RTL should
already simplify it), but I'm just fixing a bug ;-)
Segher