This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 6/9] rs6000: Clean up sub<mode>3
- 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: Sun, 21 Sep 2014 13:47:54 -0400
- Subject: Re: [PATCH 6/9] rs6000: Clean up sub<mode>3
- Authentication-results: sourceware.org; auth=none
- References: <8ab893d5c8a1ae9a4558be48e14b0e605ee90d67 dot 1411216924 dot git dot segher at kernel dot crashing dot org> <0bba27364d97d15354298295486bb57ba87b8cd2 dot 1411216924 dot git dot segher at kernel dot crashing dot org>
On Sat, Sep 20, 2014 at 2:23 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> The instruction patterns are now called subf, with the corresponding
> operand order, to be less confusing. I tried using the "sub" extended
> mnemonics instead but that only made things way, way worse.
>
> Do not allow an integer as second operand of sub<mode>3; expand doesn't
> use it. Only strlensi used it, fix that.
>
> For an integer first operand, now use a separate insn sub<mode>3_imm,
> which clobbers the carry (it is subfic after all). ctz, ffz, plus_ltu,
> plus_gtu need changes for that (the latter two will be removed later).
>
>
> 2014-09-20 Segher Boessenkool <segher@kernel.crashing.org>
>
> * config/rs6000/rs6000.md (strlensi): Don't use subsi3 with a
> constant, use addsi3 directly.
> (three anonymous define_insn, two define_split): Delete.
> (sub<mode>3): Move. Do not allow constant second operand.
> Generate different insn for constant first operand.
> (*subf<mode>3, *subf<mode>3_dot, *subf<mode>3_dot2): New.
> (subf<mode>3_imm): New.
> (ctz<mode>2, ffs<mode>2): Clobber CA_REGNO where required.
> (*plus_ltu<mode>): Only handle registers.
> (*plus_ltu<mode>_1): New. Handle integer third operand.
> (*plus_gtu<mode>): Only handle registers.
> (*plus_gtu<mode>_1): New. Handle integer third operand.
Okay.
Thanks, David