Commit 437f0a81 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/79354 (-mcpu=power8 -O2 generates power9 instruction on powerpc64le-linux)

	PR target/79354
	* config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
	wu for stxssp alternative.

	* gcc.target/powerpc/pr79354.c: New test.
	* gcc.c-torture/execute/pr79354.c: New test.

From-SVN: r245157
parent 3f343040
2017-02-03 Jakub Jelinek <jakub@redhat.com>
PR target/79354
* config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
wu for stxssp alternative.
2017-02-03 Martin Sebor <msebor@redhat.com> 2017-02-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/79352 PR tree-optimization/79352
......
...@@ -6814,7 +6814,7 @@ ...@@ -6814,7 +6814,7 @@
(unspec:SI [(match_operand:SF 1 "input_operand" (unspec:SI [(match_operand:SF 1 "input_operand"
"r, m, Z, Z, r, "r, m, Z, Z, r,
f, wu, wu, wIwH, r, f, wb, wu, wIwH, r,
wK")] wK")]
UNSPEC_SI_FROM_SF)) UNSPEC_SI_FROM_SF))
......
2017-02-03 Jakub Jelinek <jakub@redhat.com>
PR target/79354
* gcc.target/powerpc/pr79354.c: New test.
* gcc.c-torture/execute/pr79354.c: New test.
2017-02-03 Martin Sebor <msebor@redhat.com> 2017-02-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/79352 PR tree-optimization/79352
......
/* PR target/79354 */
int b, f, g;
float e;
unsigned long d;
__attribute__((noinline, noclone)) void
foo (int *a)
{
for (g = 0; g < 32; g++)
if (f)
{
e = d;
__builtin_memcpy (&b, &e, sizeof (float));
b = *a;
}
}
int
main ()
{
int h = 5;
f = 1;
asm volatile ("" : : : "memory");
foo (&h);
asm volatile ("" : : : "memory");
foo (&b);
asm volatile ("" : : : "memory");
return 0;
}
/* PR target/79354 */
/* { dg-do compile } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8 -O2" } */
/* { dg-final { scan-assembler-not {\mstxssp\M} } } */
int b, f, g;
float e;
unsigned long d;
void
foo (int *a)
{
for (g = 0; g < 32; g++)
if (f)
{
e = d;
__builtin_memcpy (&b, &e, sizeof (float));
b = *a;
}
}
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