This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] rs6000: Fix the shift patterns, and add test
- 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>
- Date: Thu, 3 Jul 2014 10:33:41 -0400
- Subject: Re: [PATCH] rs6000: Fix the shift patterns, and add test
- Authentication-results: sourceware.org; auth=none
- References: <42e5e930debe36519d3984c86e9198afd8ab73b5 dot 1404334143 dot git dot segher at kernel dot crashing dot org>
On Wed, Jul 2, 2014 at 5:06 PM, Segher Boessenkool
> Firstly, it adds back the split conditions that I accidentally removed.
> Without it the dot insns are never generated, or rather, always split
> back to a separate compare instruction.
> Secondly, the shift amount should be SI always, not GPR, or GCC will
> insert a zero-extend at expand time that it cannot get rid of later.
> The test tests whether dot-form instructions are generated for both
> "dot" and "dot2" cases, that is, with just a CC output or also a GPR
> output; for all four basic shifts, with a register amount or an
> immediate amount. It also tests for superfluous zero-extends. This
> also tests if combine "simplifies" the rotates to right-rotates, which
> it shouldn't do anymore.
> Bootstrapped and tested as usual. Okay to commit?
> 2014-07-02 Segher Boessenkool <firstname.lastname@example.org>
> * config/rs6000/rs6000.md (rotl<mode>3, ashl<mode>3, lshr<mode>3,
> ashr<mode>3): Correct mode of operands.
> (rotl<mode>3_dot, rotl<mode>3_dot2, ashl<mode>3_dot, ashl<mode>3_dot2,
> lshr<mode>3_dot, lshr<mode>3_dot2, ashr<mode>3_dot, ashr<mode>3_dot2):
> Correct mode of operands. Fix split condition.
> * gcc.target/powerpc/shift-dot.c: New test.