public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6821] rs6000: Fix rs6000_emit_le_vsx_store (PR98549)
@ 2021-01-20 19:00 Segher Boessenkool
0 siblings, 0 replies; only message in thread
From: Segher Boessenkool @ 2021-01-20 19:00 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f8c677776617ab91826af1d950b00d853eaff622
commit r11-6821-gf8c677776617ab91826af1d950b00d853eaff622
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Tue Jan 19 23:43:56 2021 +0000
rs6000: Fix rs6000_emit_le_vsx_store (PR98549)
One of the advantages of LRA is that you can create new pseudos from it
just fine. The code in rs6000_emit_le_vsx_store was not aware of this.
This patch changes that, in the process fixing PR98549 (where it is
shown that we do call rs6000_emit_le_vsx_store during LRA, which we
used to assert can not happen).
2021-01-20 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_emit_le_vsx_store): Change assert.
Adjust comment. Simplify code.
Diff:
---
gcc/config/rs6000/rs6000.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b9e90ae0468..57bf7f7828e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -9932,10 +9932,8 @@ rs6000_emit_le_vsx_load (rtx dest, rtx source, machine_mode mode)
void
rs6000_emit_le_vsx_store (rtx dest, rtx source, machine_mode mode)
{
- /* This should never be called during or after LRA, because it does
- not re-permute the source register. It is intended only for use
- during expand. */
- gcc_assert (!lra_in_progress && !reload_completed);
+ /* This should never be called after LRA. */
+ gcc_assert (can_create_pseudo_p ());
/* Use V2DImode to do swaps of types with 128-bit scalar parts (TImode,
V1TImode). */
@@ -9946,7 +9944,7 @@ rs6000_emit_le_vsx_store (rtx dest, rtx source, machine_mode mode)
source = gen_lowpart (V2DImode, source);
}
- rtx tmp = can_create_pseudo_p () ? gen_reg_rtx_and_attrs (source) : source;
+ rtx tmp = gen_reg_rtx_and_attrs (source);
rs6000_emit_le_vsx_permute (tmp, source, mode);
rs6000_emit_le_vsx_permute (dest, tmp, mode);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-20 19:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 19:00 [gcc r11-6821] rs6000: Fix rs6000_emit_le_vsx_store (PR98549) Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).