]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite/s390: Add -mzarch to ifcvt test cases.
authorRobin Dapp <rdapp@linux.ibm.com>
Tue, 6 Sep 2022 06:56:04 +0000 (08:56 +0200)
committerRobin Dapp <rdapp@linux.ibm.com>
Wed, 14 Sep 2022 11:21:10 +0000 (13:21 +0200)
Add missing -mzarch to ifcvt test cases.

gcc/testsuite/ChangeLog:

* gcc.target/s390/ifcvt-one-insn-bool.c: Add -mzarch.
* gcc.target/s390/ifcvt-one-insn-char.c: Dito.
* gcc.target/s390/ifcvt-two-insns-bool.c: Dito.
* gcc.target/s390/ifcvt-two-insns-int.c: Dito.
* gcc.target/s390/ifcvt-two-insns-long.c: Add -mzarch and change
long into long long.

gcc/testsuite/gcc.target/s390/ifcvt-one-insn-bool.c
gcc/testsuite/gcc.target/s390/ifcvt-one-insn-char.c
gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c
gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c
gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c

index 0a96b71f4583dee29c8b65544fcd527b6ecf6e7a..0c8c2f879a692c0b27b6d697e24155249a7e4e18 100644 (file)
@@ -1,7 +1,7 @@
 /* Check load on condition for bool.  */
 
 /* { dg-do compile { target { s390*-*-* } } } */
-/* { dg-options "-O2 -march=z13" } */
+/* { dg-options "-O2 -march=z13 -mzarch" } */
 
 /* { dg-final { scan-assembler "lochinh\t%r.?,1" } } */
 #include <stdbool.h>
index 9c3d041618b38fe7e86847ada52c4e4e2ec7fd5b..8c8e0ae02dfc691b37b5358b0cddfd6c4c659f29 100644 (file)
@@ -1,7 +1,7 @@
 /* Check load on condition for global char.  */
 
 /* { dg-do compile { target { s390*-*-* } } } */
-/* { dg-options "-O2 -march=z13" } */
+/* { dg-options "-O2 -march=z13 -mzarch" } */
 
 /* { dg-final { scan-assembler "locrnh\t%r.?,%r.?" } } */
 #include <stdbool.h>
index df0416a71d8329e502dcf036b9e4163bc91392c8..1027ddceb9354ab23ac213cdda36e26d0d2cd6e4 100644 (file)
@@ -1,7 +1,7 @@
 /* Check if conversion for two instructions.  */
 
 /* { dg-do run } */
-/* { dg-options "-O2 -march=z13 --save-temps" } */
+/* { dg-options "-O2 -march=z13 -mzarch --save-temps" } */
 
 /* { dg-final { scan-assembler "lochih\t%r.?,1" } } */
 /* { dg-final { scan-assembler "locrh\t.*" } } */
index 181173b91e9791f0a710314f3a379d54c68b065b..fc6946f2466daaa3c25c4434930d31f59f8de93f 100644 (file)
@@ -1,7 +1,7 @@
 /* Check if conversion for two instructions.  */
 
 /* { dg-do run } */
-/* { dg-options "-O2 -march=z13 --save-temps" } */
+/* { dg-options "-O2 -march=z13 -mzarch --save-temps" } */
 
 /* { dg-final { scan-assembler "lochih\t%r.?,1" } } */
 /* { dg-final { scan-assembler "locrh\t.*" } } */
index c66ef6cfdead3fbaacbac19d20180ff671e40951..51af4985247a19bdbc1b730febc0ad30e492b6fd 100644 (file)
@@ -1,19 +1,20 @@
 /* Check if conversion for two instructions.  */
 
 /* { dg-do run } */
-/* { dg-options "-O2 -march=z13 --save-temps" } */
+/* { dg-options "-O2 -march=z13 -mzarch --save-temps" } */
 
 /* { dg-final { scan-assembler "locghih\t%r.?,1" } } */
 /* { dg-final { scan-assembler "locgrh\t.*" } } */
+
 #include <limits.h>
 #include <stdio.h>
 #include <assert.h>
 
 __attribute__ ((noinline))
-long foo (long *a, unsigned long n)
+long long foo (long long *a, unsigned long long n)
 {
-  long min = 999999;
-  long bla = 0;
+  long long min = 999999;
+  long long bla = 0;
   for (int i = 0; i < n; i++)
     {
       if (a[i] < min)
@@ -30,9 +31,9 @@ long foo (long *a, unsigned long n)
 
 int main()
 {
-  long a[] = {2, 1, -13, LONG_MAX, LONG_MIN, 0};
+  long long a[] = {2, 1, -13, LONG_MAX, LONG_MIN, 0};
 
-  long res = foo (a, sizeof (a) / sizeof (a[0]));
+  long long res = foo (a, sizeof (a) / sizeof (a[0]));
 
   assert (res == (LONG_MIN + 1));
 }