target/104581 - compile-time regression in mode-switching
authorRichard Biener <rguenther@suse.de>
Thu, 17 Feb 2022 13:40:16 +0000 (14:40 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 18 Feb 2022 06:58:54 +0000 (07:58 +0100)
commitfe79d652c96b53384ddfa43e312cb0010251391b
tree811ee2a1099174431b334430a16a0cb46ccd7953
parent422d1d378e52418d821781ad756cf3eafc3fa9a2
target/104581 - compile-time regression in mode-switching

The x86 backend piggy-backs on mode-switching for insertion of
vzeroupper.  A recent improvement there was implemented in a way
to walk possibly the whole basic-block for all DF reg def definitions
in its mode_needed hook which is called for each instruction in
a basic-block during mode-switching local analysis.

The following mostly reverts this improvement.  It needs to be
re-done in a way more consistent with a local dataflow which
probably means making targets aware of the state of the local
dataflow analysis.

2022-02-17  Richard Biener  <rguenther@suse.de>

PR target/104581
* config/i386/i386.cc (ix86_avx_u128_mode_source): Remove.
(ix86_avx_u128_mode_needed): Return AVX_U128_DIRTY instead
of calling ix86_avx_u128_mode_source which would eventually
have returned AVX_U128_ANY in some very special case.

* gcc.target/i386/pr101456-1.c: XFAIL.
gcc/config/i386/i386.cc
gcc/testsuite/gcc.target/i386/pr101456-1.c