[PATCH 1/4]middle-end Support not decomposing specific divisions during vectorization.
Jeff Law
jeffreyalaw@gmail.com
Mon Oct 31 17:12:48 GMT 2022
On 10/31/22 05:34, Tamar Christina wrote:
>> The type of the expression should be available via the mode and the
>> signedness, no? So maybe to avoid having both RTX and TREE on the target
>> hook pass it a wide_int instead for the divisor?
>>
> Done.
>
> Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu
> and no issues.
>
> Ok for master?
>
> Thanks,
> Tamar
>
> gcc/ChangeLog:
>
> * expmed.h (expand_divmod): Pass tree operands down in addition to RTX.
> * expmed.cc (expand_divmod): Likewise.
> * explow.cc (round_push, align_dynamic_address): Likewise.
> * expr.cc (force_operand, expand_expr_divmod): Likewise.
> * optabs.cc (expand_doubleword_mod, expand_doubleword_divmod):
> Likewise.
> * target.h: Include tree-core.
> * target.def (can_special_div_by_const): New.
> * targhooks.cc (default_can_special_div_by_const): New.
> * targhooks.h (default_can_special_div_by_const): New.
> * tree-vect-generic.cc (expand_vector_operation): Use it.
> * doc/tm.texi.in: Document it.
> * doc/tm.texi: Regenerate.
> * tree-vect-patterns.cc (vect_recog_divmod_pattern): Check for support.
> * tree-vect-stmts.cc (vectorizable_operation): Likewise.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/vect/vect-div-bitmask-1.c: New test.
> * gcc.dg/vect/vect-div-bitmask-2.c: New test.
> * gcc.dg/vect/vect-div-bitmask-3.c: New test.
> * gcc.dg/vect/vect-div-bitmask.h: New file.
>
> --- inline copy of patch ---
>
OK for the trunk.
Jeff
More information about the Gcc-patches
mailing list