This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: S/390: Fix warnings in "*setmem_long..." patterns.
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, vogt at linux dot vnet dot ibm dot com
- Date: Wed, 2 Dec 2015 14:11:47 +0100
- Subject: Re: S/390: Fix warnings in "*setmem_long..." patterns.
- Authentication-results: sourceware.org; auth=none
- References: <20151202125141 dot 9BF6CF8BB at oc7340732750 dot ibm dot com>
On 12/02/2015 01:51 PM, Ulrich Weigand wrote:
> Andreas Krebbel wrote:
>> On 12/02/2015 11:12 AM, Dominik Vogt wrote:
>>> Hopefully, this is correct now; it does pass the functional test case
>>> that's part of the patch. Unfortunately the define_insn patters
>>> had to be duplicated because of the new subreg offsets.
>>
>> The number of patterns could possibly be reduced using the define_subst machinery. I'm looking into
>> this for some other changes. No need to do this right now. We can do this later on-top.
>
> For this particular issue, shouldn't a simple mode_attr be OK?
> I see that the sh port uses this:
>
> (define_mode_attr lowpart_be [(QI "3") (HI "2")])
>
> [(set (reg:SI T_REG)
> (eq:SI
> (subreg:QIHI
> (and:SI (match_operand:SI 0 "arith_reg_operand")
> (match_operand:SI 1 "arith_reg_operand")) <lowpart_be>)
> (const_int 0)))]
Unfortunately in our case the attribute value doesn't only depend on the mode. It also depends on
zarch/esa. We would need some kind of conditional attribute.
-Andreas-