This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow all 1s of integer as standard SSE constants
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Apr 2016 18:31:41 +0200
- Subject: Re: [PATCH] Allow all 1s of integer as standard SSE constants
- Authentication-results: sourceware.org; auth=none
- References: <20160420195359 dot GA3113 at intel dot com> <CAFULd4ZJrw9hWtkxCZmRHinz+aACOvnkRU4FUXVYcFD4_qjeVA at mail dot gmail dot com> <CAFULd4Y8HGC=+iFtp9PmqW2XcVwnhNygH6si0J1OCNWipGjBLg at mail dot gmail dot com> <CAFULd4b3WPYGr=uL=1D7RmnrYBeviVt0=-ckgT-8zJJcae+m3A at mail dot gmail dot com> <CAMe9rOr9B+X-H0PmBt=fsO3BmQR_MrF3nAg2pdsOoa3NpNV3PA at mail dot gmail dot com> <CAFULd4auhHb54j3GwZRCUiuAxdPcbKk+oA4+paWU=tWsQ+7Whw at mail dot gmail dot com> <CAMe9rOovKPRPNZyaq+-uWz3kwFXJRrTuh4-cFrxYMaWaUZJoYg at mail dot gmail dot com> <CAFULd4bu+r+AFgWg+W+xtKUP=diOdsfh-dxCScFZTyEf+Uu+xg at mail dot gmail dot com> <CAMe9rOrx2R+bDOHZxcp_tcMBpgD0zVsxM7L0FMOAzHKXLQPuGg at mail dot gmail dot com> <CAFULd4ab3zoOWqe3KnMHgjnRusPFoBdvFxWpb5hAMoZG24OgZw at mail dot gmail dot com> <CAMe9rOo3HzitjaH2sF7vio+OVekQVjn0WrL4D5pLkXVbtxmXNA at mail dot gmail dot com> <CAFULd4bZeZdVrTetdiS5Dp9s+BZLTiDYx7YAiy4WEfDOwtB0yQ at mail dot gmail dot com> <CAMe9rOrnJhtFN+AuPznhHh6K7Bs0hdGvcNiv-dcSz2smd37Dcg at mail dot gmail dot com>
On Thu, Apr 21, 2016 at 4:50 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> I tried and it doesn't work since the correct mode may not be always
>>> available in predicates. Yes, they pass mode. But they just do
>>>
>>> mode = GET_MODE (op);
>>>
>>> which returns VOIDmode for -1.
>>
>> Well, looking at generated gcc/insns-preds.c, the predicates do:
>>
>> (mode == VOIDmode || GET_MODE (op) == mode).
>>
>> They *check* and don't *assign* "mode" variable.
>>
>> So, I see no problem checking "mode" variable (that gets the value
>> from the pattern) in the predicates.
>
> This is an incomplete list:
>
> combine.c: && ! push_operand (dest, GET_MODE (dest)))
> expr.c: if (push_operand (x, GET_MODE (x)))
> expr.c: && ! push_operand (x, GET_MODE (x))))
> gcse.c: && ! push_operand (dest, GET_MODE (dest)))
> gcse.c: if (general_operand (exp, GET_MODE (reg)))
> ifcvt.c: if (! general_operand (cmp_a, GET_MODE (cmp_a))
> ifcvt.c: || ! general_operand (cmp_b, GET_MODE (cmp_b)))
> ifcvt.c: else if (general_operand (b, GET_MODE (b)))
> ifcvt.c: if (! general_operand (a, GET_MODE (a)) || tmp_a)
> ifcvt.c: if (! general_operand (b, GET_MODE (b)) || tmp_b)
> ira-costs.c: if (address_operand (op, GET_MODE (op))
> ira-costs.c: && general_operand (SET_SRC (set), GET_MODE (SET_SRC (set))))
> lower-subreg.c: if (GET_MODE (op_operand) != word_mode
> lower-subreg.c: && GET_MODE_SIZE (GET_MODE (op_operand)) > UNITS_PER_WORD)
> lower-subreg.c: GET_MODE (op_operand),
> lra-constraints.c: if (simplify_operand_subreg (i, GET_MODE (old)) ||
> op_change_p)
> optabs.c: create_output_operand (&ops[0], target, GET_MODE (target));
> optabs.c: create_input_operand (&ops[1], op0, GET_MODE (op0));
> postreload-gcse.c: if (! push_operand (dest, GET_MODE (dest)))
> postreload-gcse.c: && general_operand (src, GET_MODE (src))
> postreload-gcse.c: && general_operand (dest, GET_MODE (dest))
> postreload-gcse.c: && general_operand (src, GET_MODE (src))
>
> IRA and LRA use GET_MODE and pass it to predicates.
I don't know what are you trying to prove here ...
Uros.