[i386] Make the vzeroupper pattern describe its effects (PR91994)
The problem in this PR was that vzeroupper has an effect on register
contents, but those effects weren't modelled in the rtl pattern,
which was just an unspec_volatile.
This patch fixes that by running a subpass after vzeroupper insertion
to add SETs and CLOBBERs as appropriate. See the comments in the patch
for more details.
2019-10-07 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR target/91994
* config/i386/sse.md (avx_vzeroupper): Turn into a define_expand
and wrap the unspec_volatile in a parallel.
(*avx_vzeroupper): New define_insn. Use a match_parallel around
the unspec_volatile.
* config/i386/predicates.md (vzeroupper_pattern): Expect the
unspec_volatile to be wrapped in a parallel.
* config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper)
(ix86_add_reg_usage_to_vzerouppers): New functions.
(rest_of_handle_insert_vzeroupper): Use them to add register
usage information to the vzeroupper instructions.
gcc/testsuite/
PR target/91994
* gcc.target/i386/pr91994.c: New test.
From-SVN: r276648