[gcc(refs/users/aoliva/heads/testme)] testsuite: ppc: libstdc++ checks vect with -O2
Alexandre Oliva
aoliva@gcc.gnu.org
Wed Mar 18 10:45:19 GMT 2026
https://gcc.gnu.org/g:0d5d9d92455c8fdb8e893264068bdf2f3d018da0
commit 0d5d9d92455c8fdb8e893264068bdf2f3d018da0
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Mar 18 04:13:01 2026 -0300
testsuite: ppc: libstdc++ checks vect with -O2
Some of the ppc effective target tests for vector instructions can get
the tested-for instruction optimized away when compiling with
optimization, like the libstdc++ testsuite does. Add volatile to the
asm statements, like other such tests.
for gcc/testsuite/ChangeLog
* lib/target-supports.exp (check_p8vector_hw_available): Make
asm volatile.
(check_vsx_hw_available): Likewise.
(check_vmx_hw_available): Likewise.
Diff:
---
gcc/testsuite/lib/target-supports.exp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index bfb8ecadf880..d611eb97e29b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3258,7 +3258,7 @@ proc check_p8vector_hw_available { } {
{
vector long long v1 = {0x1, 0x2};
vector long long v2;
- asm ("xxlorc %0,%1,%1" : "=wa" (v2) : "wa" (v1));
+ asm volatile ("xxlorc %0,%1,%1" : "=wa" (v2) : "wa" (v1));
return 0;
}
} $options
@@ -3557,7 +3557,7 @@ proc check_vsx_hw_available { } {
{
vector int v1 = {0, 0, 0, 0};
vector int v2;
- asm ("xxlor %0,%1,%1" : "=wa" (v2) : "wa" (v1));
+ asm volatile ("xxlor %0,%1,%1" : "=wa" (v2) : "wa" (v1));
return 0;
}
} $options
@@ -3588,7 +3588,7 @@ proc check_vmx_hw_available { } {
{
vector int v1 = {0, 0, 0, 0};
vector int v2;
- asm ("vor %0,%1,%1" : "=v" (v2) : "v" (v1));
+ asm volatile ("vor %0,%1,%1" : "=v" (v2) : "v" (v1));
return 0;
}
} $options
More information about the Gcc-cvs
mailing list