testsuite/105486 - adjust testcase to avoid misaligned accesses

Message ID 20220505084211.687C413B11@imap2.suse-dmz.suse.de
State Committed
Commit 000f4480005035d0811e009a7cb25b42721f0a6e
Headers
Series testsuite/105486 - adjust testcase to avoid misaligned accesses |

Commit Message

Richard Biener May 5, 2022, 8:42 a.m. UTC
  This properly aligns data, increasing test coverage.

Tested on x86_64-unknown-linux-gnu, pushed.

2022-05-05  Richard Biener  <rguenther@suse.de>

	PR testsuite/105486
	* gcc.dg/vect/bb-slp-pr104240.c: Align all data.
---
 gcc/testsuite/gcc.dg/vect/bb-slp-pr104240.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr104240.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr104240.c
index 78905a468e0..1045f31d4d0 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr104240.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr104240.c
@@ -5,6 +5,9 @@ 
 
 void foo (int *c, float *x, float *y)
 {
+  c = __builtin_assume_aligned (c, __BIGGEST_ALIGNMENT__);
+  x = __builtin_assume_aligned (x, __BIGGEST_ALIGNMENT__);
+  y = __builtin_assume_aligned (y, __BIGGEST_ALIGNMENT__);
   c[0] = x[0] < y[0];
   c[1] = y[1] > x[1];
   c[2] = x[2] < y[2];