This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rs6000: Make rs6000_split_logical handle inverted 2nd operand (PR64358)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]