public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Robin Dapp <rdapp@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2660] testsuite/s390: Add -mzarch to ifcvt test cases. Date: Wed, 14 Sep 2022 11:34:22 +0000 (GMT) [thread overview] Message-ID: <20220914113422.234493858430@sourceware.org> (raw) https://gcc.gnu.org/g:2aa5f8808d1d83c58ced64c89c14bdd237135795 commit r13-2660-g2aa5f8808d1d83c58ced64c89c14bdd237135795 Author: Robin Dapp <rdapp@linux.ibm.com> Date: Tue Sep 6 08:56:04 2022 +0200 testsuite/s390: Add -mzarch to ifcvt test cases. 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. Diff: --- gcc/testsuite/gcc.target/s390/ifcvt-one-insn-bool.c | 2 +- gcc/testsuite/gcc.target/s390/ifcvt-one-insn-char.c | 2 +- gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c | 2 +- gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c | 2 +- gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c | 13 +++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-bool.c b/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-bool.c index 0a96b71f458..0c8c2f879a6 100644 --- a/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-bool.c +++ b/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-bool.c @@ -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> diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-char.c b/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-char.c index 9c3d041618b..8c8e0ae02df 100644 --- a/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-char.c +++ b/gcc/testsuite/gcc.target/s390/ifcvt-one-insn-char.c @@ -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> diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c index df0416a71d8..1027ddceb93 100644 --- a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c +++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c @@ -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.*" } } */ diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c index 181173b91e9..fc6946f2466 100644 --- a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c +++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c @@ -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.*" } } */ diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c index c66ef6cfdea..51af4985247 100644 --- a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c +++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c @@ -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)); }
reply other threads:[~2022-09-14 11:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220914113422.234493858430@sourceware.org \ --to=rdapp@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).