public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r8-10515] rs6000: Properly handle LE index munging in vec_shr (PR94710)
@ 2020-09-17 21:52 Segher Boessenkool
0 siblings, 0 replies; only message in thread
From: Segher Boessenkool @ 2020-09-17 21:52 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:550a13d7163a480aa6158bae54dfd080995884d9
commit r8-10515-g550a13d7163a480aa6158bae54dfd080995884d9
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Fri Apr 24 13:33:14 2020 +0000
rs6000: Properly handle LE index munging in vec_shr (PR94710)
The PR shows the compiler crashing with -mvsx -mlittle -O0. This turns
out to be caused by a failure to make of the higher bits in an index
endian conversion.
2020-04-24 Segher Boessenkool <segher@kernel.crashing.org>
PR target/94710
* config/rs6000/vector.md (vec_shr_<mode> for VEC_L): Correct little
endian byteshift_val calculation.
(cherry picked from commit 9c725245beed2f056b67f5dc218fef6cb869c5f2)
Diff:
---
gcc/config/rs6000/vector.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index 21743c6be26..fa9c1616634 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -1227,7 +1227,8 @@
emit_move_insn (zero_reg, CONST0_RTX (<MODE>mode));
if (!BYTES_BIG_ENDIAN)
{
- byteshift_val = 16 - byteshift_val;
+ /* Note, byteshift_val can be 0! */
+ byteshift_val = -byteshift_val & 15;
op1 = zero_reg;
op2 = operands[1];
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-17 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 21:52 [gcc r8-10515] rs6000: Properly handle LE index munging in vec_shr (PR94710) 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).