Commit 4236e880 by Mihailo Stojanovic Committed by Jeff Law

mips.c (mips_cannot_force_const_mem): Reject vector constants.

	* config/mips/mips.c (mips_cannot_force_const_mem): Reject
	vector constants.

	* gcc.target/mips/constant-spill.c: New test.

From-SVN: r276969
parent ac308262
2019-10-14 Mihailo Stojanovic <mistojanovic@wavecomp.com>
* config/mips/mips.c (mips_cannot_force_const_mem): Reject
vector constants.
2019-10-14 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c: Use unsigned ints for the picbase label
......
......@@ -2409,7 +2409,8 @@ mips_cannot_force_const_mem (machine_mode mode, rtx x)
references, reload will consider forcing C into memory and using
one of the instruction's memory alternatives. Returning false
here will force it to use an input reload instead. */
if (CONST_INT_P (x) && mips_legitimate_constant_p (mode, x))
if ((CONST_INT_P (x) || GET_CODE (x) == CONST_VECTOR)
&& mips_legitimate_constant_p (mode, x))
return true;
split_const (x, &base, &offset);
......
2019-10-14 Mihailo Stojanovic <mistojanovic@wavecomp.com>
* gcc.target/mips/constant-spill.c: New test.
2019-10-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/92069
......
/* { dg-do compile } */
/* { dg-options "-mfp64 -mhard-float -mmsa" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-Os" "-O0" "-O1" "-O2" } { "" } } */
void foo (void);
void bar (void)
{
int x[4];
int y[4];
int i;
while (1)
{
foo ();
for (i = 0; i < 4; i++)
{
x[i] = 0;
y[i] = 0;
}
asm volatile (""
:
:"m"(x), "m"(y)
:"memory");
}
}
/* { dg-final { scan-assembler-not "ld.w" } } */
/* { dg-final { scan-assembler-times "st.w" 2 } } */
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