This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000: Make rs6000_split_logical handle inverted 2nd operand (PR64358)
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Pat Haugen <pthaugen at linux dot vnet dot ibm dot com>
- Date: Sat, 20 Dec 2014 10:29:13 -0500
- Subject: Re: [PATCH] rs6000: Make rs6000_split_logical handle inverted 2nd operand (PR64358)
- Authentication-results: sourceware.org; auth=none
- References: <026b6a6be3c17513aedc8272f4fd6942e6db0b92 dot 1419087240 dot git dot segher at kernel dot crashing dot org>
On Sat, Dec 20, 2014 at 10:18 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> If rs6000_split_logical is asked to invert the second operand (but not
> the first), it emits RTL that is just that; but canonical RTL has the
> first arm inverted if only one, not the second. This patch fixes that.
>
> With that in place, the bug in PR target/64358 is easily fixed. Do
> that. Also change the other 128-bit boolc splitter to have the same
> operand order as everything else. And use BOOL_REGS_OP1 and _OP2 for
> operands 1 resp. 2 (not the other way around); this doesn't actually
> matter, but it was a bit confusing.
>
> This fixes builtin-arith-overflow-{10,11}.c as well.
>
> Bootstrapped (no fortran this time, it doesn't build right now) and
> tested on powerpc64-linux, -m32,-m32/-mpowerpc64,-m64,-m64/-mlra; no
> regressions (and the mentioned cases fixed).
>
> Okay for mainline? Does this need backporting as well?
>
>
> Segher
>
>
> 2014-12-20 Segher Boessenkool <segher@kernel.crashing.org>
>
> gcc/
> PR target/64358
> * config/rs6000/rs6000.c (rs6000_split_logical_inner): Swap the
> input operands if only the second is inverted.
> * config/rs6000/rs6000.md (*boolc<mode>3_internal1 for BOOL_128):
> Swap BOOL_REGS_OP1 and BOOL_REGS_OP2. Correct arguments to
> rs6000_split_logical.
> (*boolc<mode>3_internal2 for TI2): Swap operands[1] and operands[2].
Okay.
Thanks, David