This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix vec_extract_lo_* patterns (PR target/81225)
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Jun 2017 15:57:53 +0300
- Subject: Re: [PATCH] Fix vec_extract_lo_* patterns (PR target/81225)
- Authentication-results: sourceware.org; auth=none
- References: <20170629165109.GD2123@tucnak>
On 29 Jun 18:51, Jakub Jelinek wrote:
> This patch fixes various issues with the vec_extract_lo_* patterns.
> There are splitters for these, but only for some cases (no mask, and
> in one case also not xmm32+ reg) that change those into just a copy or load
> of the low part subreg, but if those can't be used, the vextract* insns
> don't accept memory input operand, but 3 of the 4 patterns have
> nonimmediate_operand input, which is wrong for the masked case, and the
> other one uses register_operand, even when the splitter can handle
> nonimmediate_operand when not masked.
> Thus this patch makes sure that the input is nonimmediate_operand and v,vm
> if not masked and register_operand and v,v if masked, returns "#" to ensure
> splitting in cases the input is a memory, simplifies the conditions (for
> masked we don't need to test at runtime if both arguments aren't MEMs,
> because the predicate is now register_operand with v constraint), and
> changes the single case that used register_operand to follow the rest.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Your patch is OK for trunk.
> 2017-06-29 Jakub Jelinek <firstname.lastname@example.org>
> PR target/81225
> * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For
> V8FI, V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
> of nonimmediate_operand and <store_mask_constraint> instead of m for
> the input operand. For V8FI iterator, always split if input is a MEM.
> For V16FI and V8SF_256 iterators, don't test if both operands are MEM
> if <mask_applied>. For VI4F_256 iterator, use <store_mask_predicate>
> instead of register_operand and <store_mask_constraint> instead of v for
> the input operand. Make sure both operands aren't MEMs for if not
> * gcc.target/i386/pr81225.c: New test.