Commit 023e7b55 by Will Schmidt Committed by Will Schmidt

builtins-3-p8.c: Update stanzas.


[testsuite]
2018-02-16  Will Schmidt  <will_schmidt@vnet.ibm.com>

	target/pr84371
	* gcc.target/powerpc/builtins-3-p8.c: Update stanzas.
	* gcc.target/powerpc/builtins-3-p9.c: Update stanzas, Enhance test.
	* gcc.target/powerpc/builtins-3-runnable.c: Update stanzas.
	* gcc.target/powerpc/builtins-3-vec_reve_runnable.c: Same.
	* gcc.target/powerpc/builtins-3.c: Same.

From-SVN: r257758
parent b76f3abc
2018-02-16 Will Schmidt <will_schmidt@vnet.ibm.com>
target/pr84371
* gcc.target/powerpc/builtins-3-p8.c: Update stanzas.
* gcc.target/powerpc/builtins-3-p9.c: Update stanzas, Enhance test.
* gcc.target/powerpc/builtins-3-runnable.c: Update stanzas.
* gcc.target/powerpc/builtins-3-vec_reve_runnable.c: Same.
* gcc.target/powerpc/builtins-3.c: Same.
2018-02-16 Nathan Sidwell <nathan@acm.org>
* g++.old-deja/g++.jason/scoping15.C: Fix dg-warning.
......
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mcpu=power8" } */
/* { dg-options "-maltivec -mcpu=power8" } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
#include <altivec.h>
......
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mcpu=power9 -O1" } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
#include <altivec.h>
......@@ -47,6 +48,43 @@ test_vull_bperm_vull_vuc (vector unsigned long long x,
return vec_bperm (x, y);
}
vector signed char
test_nabs_char (vector signed char x)
{
return vec_nabs (x);
}
vector short
test_nabs_short (vector short x)
{
return vec_nabs (x);
}
vector int
test_nabs_int (vector int x)
{
return vec_nabs (x);
}
vector signed char
test_neg_char (vector signed char x)
{
return vec_neg (x);
}
vector short
test_neg_short (vector short x)
{
return vec_neg (x);
}
vector int
test_neg_int (vector int x)
{
return vec_neg (x);
}
/* Expected test results:
test_ne_char 1 vcmpneb
......@@ -57,6 +95,12 @@ test_vull_bperm_vull_vuc (vector unsigned long long x,
test_vull_bperm_vull_vuc 1 vbpermd
test_nabs_long_long (-O0) 1 xxspltib, 1 vsubudm, 1 vminsd
test_nabs_long_long (-O1) 1 vnegd, vminsd
test_nabs_char (P9) 1 xxspltib, 1 vsububm, 1 vminsb
test_nabs_short (P9) 1 xxspltib, 1 vsubuhm, 1 vminsh
test_nabs_int (P9) 1 vnegw, 1 vminsw
test_neg_char (P9) 1 xxspltib, 1 vsububm
test_neg_short (P9) 1 xxspltib, 1 vsubuhm
test_neg_int (P9) 1 vnegw
*/
/* { dg-final { scan-assembler-times "vcmpneb" 1 } } */
......@@ -64,9 +108,16 @@ test_vull_bperm_vull_vuc (vector unsigned long long x,
/* { dg-final { scan-assembler-times "vcmpnew" 1 } } */
/* { dg-final { scan-assembler-times "vcmpequd" 1 } } */
/* { dg-final { scan-assembler-times "xxlnor" 1 } } */
/* { dg-final { scan-assembler-times "xxspltib" 0 } } */
/* { dg-final { scan-assembler-times "xxspltib" 4 } } */
/* { dg-final { scan-assembler-times "vsubudm" 0 } } */
/* { dg-final { scan-assembler-times "vsububm" 2 } } */
/* { dg-final { scan-assembler-times "vsubuhm" 2 } } */
/* { dg-final { scan-assembler-times "vsubuwm" 0 } } */
/* { dg-final { scan-assembler-times "vminsb" 1 } } */
/* { dg-final { scan-assembler-times "vminsh" 1 } } */
/* { dg-final { scan-assembler-times "vminsw" 1 } } */
/* { dg-final { scan-assembler-times "vminsd" 1 } } */
/* { dg-final { scan-assembler-times "vnegd" 2 } } */
/* { dg-final { scan-assembler-times "vnegw" 2 } } */
/* { dg-final { scan-assembler-times "vbpermd" 1 } } */
/* { dg-do run { target { powerpc*-*-linux* } } } */
/* { dg-do run { target { p8vector_hw } } } */
/* { dg-require-effective-target vsx_hw } */
/* { dg-options "-O2 -mvsx -mcpu=power8" } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=power8" } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
#include <altivec.h> // vector
......
/* { dg-do run { target { powerpc*-*-linux* } } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
/* { dg-do run { target { vsx_hw } } } */
/* { dg-options "-O2 -mvsx -mcpu=power7" } */
#include <altivec.h> // vector
......
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-maltivec -mvsx" } */
/* { dg-options "-O2 -mvsx -mcpu=power6" } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
#include <altivec.h>
......
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