diff options
author | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2024-03-08 15:01:15 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2024-03-08 15:03:31 +0000 |
commit | 5119c7927c70b02ab9768b30f40564480f556432 (patch) | |
tree | e40d21dabf9520bcac6aca0223034eb182c404e9 | |
parent | 64273a7e6bd8ba60058174d147521dd65d705637 (diff) | |
download | gcc-5119c7927c70b02ab9768b30f40564480f556432.zip gcc-5119c7927c70b02ab9768b30f40564480f556432.tar.gz gcc-5119c7927c70b02ab9768b30f40564480f556432.tar.bz2 |
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.
-rw-r--r-- | gcc/testsuite/gcc.target/arm/builtin-bswap.x | 8 |
1 files 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 c96dbe6..dc8f910 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); } |