diff mbox series

testsuite: Add arm testcase for PR105374

Message ID 20220427075032.13944-1-christophe.lyon@arm.com
State New
Headers show
Series testsuite: Add arm testcase for PR105374 | expand

Commit Message

Christophe Lyon April 27, 2022, 7:50 a.m. UTC
As discussed in the PR, here is the testcase with the appropriate dg-*
directives.

Tested on arm-none-eabi with
1 -mcpu=cortex-a7/-mfloat-abi=soft/-march=armv7ve+simd
2 -mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd
3 -mthumb/-mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd
4 -mthumb/-mfloat-abi=soft/-march=armv6s-m
5 -mthumb/-mfloat-abi=soft/-march=armv7-m
6 -mthumb/-mfloat-abi=hard/-march=armv7e-m+fp
7 -mthumb/-mfloat-abi=hard/-march=armv7e-m+fp.dp
8 -mthumb/-mfloat-abi=hard/-march=armv8-m.main+fp+dsp
9 -mthumb/-mfloat-abi=hard/-march=armv8.1-m.main+mve.fp+fp.dp
10 -mthumb/-mfloat-abi=hard/-march=armv8.1-m.main+mve

The test is UNSUPPORTED with the first three ones (because of
-mcpu=cortex-a7), ignored with armv6s-m, and PASSes with all the other
ones, while it used crash without Jakub's fix (r12-8263), ie. FAIL
with options 5,6,7,8,10. The test passed without Jakub's fix with
option 9 because the problem happens only with an integer-only MVE.

2022-04-26  Christophe Lyon  <christophe.lyon@arm.com>

	gcc/testsuite/

	PR tree-optimization/105374
	* gcc.target/arm/simd/pr105374.C: New.
---
 gcc/testsuite/gcc.target/arm/simd/pr105374.C | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/arm/simd/pr105374.C

Comments

Jakub Jelinek April 27, 2022, 8:14 a.m. UTC | #1
On Wed, Apr 27, 2022 at 09:50:32AM +0200, Christophe Lyon via Gcc-patches wrote:
> As discussed in the PR, here is the testcase with the appropriate dg-*
> directives.
> 
> Tested on arm-none-eabi with
> 1 -mcpu=cortex-a7/-mfloat-abi=soft/-march=armv7ve+simd
> 2 -mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd
> 3 -mthumb/-mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd
> 4 -mthumb/-mfloat-abi=soft/-march=armv6s-m
> 5 -mthumb/-mfloat-abi=soft/-march=armv7-m
> 6 -mthumb/-mfloat-abi=hard/-march=armv7e-m+fp
> 7 -mthumb/-mfloat-abi=hard/-march=armv7e-m+fp.dp
> 8 -mthumb/-mfloat-abi=hard/-march=armv8-m.main+fp+dsp
> 9 -mthumb/-mfloat-abi=hard/-march=armv8.1-m.main+mve.fp+fp.dp
> 10 -mthumb/-mfloat-abi=hard/-march=armv8.1-m.main+mve
> 
> The test is UNSUPPORTED with the first three ones (because of
> -mcpu=cortex-a7), ignored with armv6s-m, and PASSes with all the other
> ones, while it used crash without Jakub's fix (r12-8263), ie. FAIL
> with options 5,6,7,8,10. The test passed without Jakub's fix with
> option 9 because the problem happens only with an integer-only MVE.
> 
> 2022-04-26  Christophe Lyon  <christophe.lyon@arm.com>
> 
> 	gcc/testsuite/
> 
> 	PR tree-optimization/105374
> 	* gcc.target/arm/simd/pr105374.C: New.

Ok, thanks.

	Jakub
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/simd/pr105374.C b/gcc/testsuite/gcc.target/arm/simd/pr105374.C
new file mode 100644
index 00000000000..2b9096f1f52
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/simd/pr105374.C
@@ -0,0 +1,8 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-require-effective-target arm_v8_1m_mve_ok } */
+/* { dg-add-options arm_v8_1m_mve } */
+
+typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
+v4f f_x, f_y;
+long f() { return (f_x < f_y | f_x <= f_y)[2]; }