Commit 9c725245 by Segher Boessenkool

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.
parent 9407f0c3
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.
2020-04-24 Andrew Stubbs <ams@codesourcery.com> 2020-04-24 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn.md (*mov<mode>_insn): Only split post-reload. * config/gcn/gcn.md (*mov<mode>_insn): Only split post-reload.
......
...@@ -1426,7 +1426,8 @@ ...@@ -1426,7 +1426,8 @@
emit_move_insn (zero_reg, CONST0_RTX (<MODE>mode)); emit_move_insn (zero_reg, CONST0_RTX (<MODE>mode));
if (!BYTES_BIG_ENDIAN) if (!BYTES_BIG_ENDIAN)
{ {
byteshift_val = 16 - byteshift_val; /* Note, byteshift_val can be 0! */
byteshift_val = -byteshift_val & 15;
op1 = zero_reg; op1 = zero_reg;
op2 = operands[1]; op2 = operands[1];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment