From: Robin Dapp <rdapp@linux.ibm.com>
To: gcc-patches@gcc.gnu.org
Cc: krebbel@linux.ibm.com, iii@linux.ibm.com
Subject: [PATCH 6/6] S/390: Add test for noce_convert_multiple_sets.
Date: Wed, 14 Nov 2018 13:08:00 -0000 [thread overview]
Message-ID: <20181114130752.5057-7-rdapp@linux.ibm.com> (raw)
In-Reply-To: <20181114130752.5057-1-rdapp@linux.ibm.com>
New test.
--
gcc/testsuite/ChangeLog:
2018-11-14 Robin Dapp <rdapp@linux.ibm.com>
* gcc.target/s390/ifcvt-two-insns-int.c: New test.
---
.../gcc.target/s390/ifcvt-two-insns-int.c | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c
diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c
new file mode 100644
index 00000000000..952c8fd890e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c
@@ -0,0 +1,26 @@
+/* Check load on condition for bool. */
+
+/* { dg-do compile { target { s390*-*-* } } } */
+/* { dg-options "-O2 -march=z13" } */
+
+/* { dg-final { scan-assembler "lochinhe\t%r.?,1" } } */
+/* { dg-final { scan-assembler "locrhe\t.*" } } */
+#include <stdbool.h>
+
+int foo (int *a, unsigned int n)
+{
+ int min = 999999;
+ int bla = 0;
+ for (int i = 0; i < n; i++)
+ {
+ if (a[i] < min)
+ {
+ min = a[i];
+ bla = 1;
+ }
+ }
+
+ if (bla)
+ min += 1;
+ return min;
+}
--
2.17.0
next prev parent reply other threads:[~2018-11-14 13:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 13:08 [PATCH 0/6] If conversion with multiple sets Robin Dapp
2018-11-14 13:08 ` [PATCH 3/6] ifcvt: Use enum instead of transform_name string Robin Dapp
2018-11-14 13:08 ` [PATCH 2/6] ifcvt: Allow constants operands in noce_convert_multiple_sets Robin Dapp
2018-11-14 21:38 ` Jeff Law
2018-11-15 11:37 ` Robin Dapp
2018-12-01 17:33 ` Jeff Law
2018-11-14 13:08 ` [PATCH 4/6] S/390: Implement noce_conversion_profitable_p Robin Dapp
2018-11-14 13:08 ` [PATCH 5/6] ifcvt: Only created temporaries as needed Robin Dapp
2018-11-14 21:41 ` Jeff Law
2018-11-15 11:38 ` Robin Dapp
2018-11-21 0:21 ` Jeff Law
2018-11-14 13:08 ` Robin Dapp [this message]
2018-11-14 13:08 ` [PATCH 1/6] ifcvt: Store the number of created cmovs Robin Dapp
2018-11-14 20:22 ` Jeff Law
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=20181114130752.5057-7-rdapp@linux.ibm.com \
--to=rdapp@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iii@linux.ibm.com \
--cc=krebbel@linux.ibm.com \
/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: link
Be 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).