[gcc r14-9394] ARM: Fix builtin-bswap-1.c test [PR113915]
Wilco Dijkstra
wilco@gcc.gnu.org
Fri Mar 8 15:05:03 GMT 2024
https://gcc.gnu.org/g:5119c7927c70b02ab9768b30f40564480f556432
commit r14-9394-g5119c7927c70b02ab9768b30f40564480f556432
Author: Wilco Dijkstra <wilco.dijkstra@arm.com>
Date: Fri Mar 8 15:01:15 2024 +0000
ARM: Fix builtin-bswap-1.c test [PR113915]
On Thumb-2 the use of CBZ blocks conditional execution, so change the
test to compare with a non-zero value.
gcc/testsuite/ChangeLog:
PR target/113915
* gcc.target/arm/builtin-bswap.x: Fix test to avoid emitting CBZ.
Diff:
---
gcc/testsuite/gcc.target/arm/builtin-bswap.x | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/testsuite/gcc.target/arm/builtin-bswap.x b/gcc/testsuite/gcc.target/arm/builtin-bswap.x
index c96dbe6329c..dc8f910e000 100644
--- a/gcc/testsuite/gcc.target/arm/builtin-bswap.x
+++ b/gcc/testsuite/gcc.target/arm/builtin-bswap.x
@@ -10,7 +10,7 @@ extern short foos16 (short);
short swaps16_cond (short x, int y)
{
short z = x;
- if (y)
+ if (y != 2)
z = __builtin_bswap16 (x);
return foos16 (z);
}
@@ -27,7 +27,7 @@ extern unsigned short foou16 (unsigned short);
unsigned short swapu16_cond (unsigned short x, int y)
{
unsigned short z = x;
- if (y)
+ if (y != 2)
z = __builtin_bswap16 (x);
return foou16 (z);
}
@@ -43,7 +43,7 @@ extern int foos32 (int);
int swaps32_cond (int x, int y)
{
int z = x;
- if (y)
+ if (y != 2)
z = __builtin_bswap32 (x);
return foos32 (z);
}
@@ -60,7 +60,7 @@ extern unsigned int foou32 (unsigned int);
unsigned int swapsu2 (unsigned int x, int y)
{
int z = x;
- if (y)
+ if (y != 2)
z = __builtin_bswap32 (x);
return foou32 (z);
}
More information about the Gcc-cvs
mailing list