diff mbox

S/390: Fix warnings in "*setmem_long..." patterns.

Message ID 20151202101230.GA601@linux.vnet.ibm.com
State New
Headers show

Commit Message

Dominik Vogt Dec. 2, 2015, 10:12 a.m. UTC
Hopefully, this is correct now; it does pass the functional test case
that's part of the patch.  Unfortunately the define_insn patters
had to be duplicated because of the new subreg offsets.  Not sure
whether I've missed any "use" patterns that should be added.

Ciao

Dominik ^_^  ^_^

Comments

Andreas Krebbel Dec. 2, 2015, 11:43 a.m. UTC | #1
On 12/02/2015 11:12 AM, Dominik Vogt wrote:
> Hopefully, this is correct now; it does pass the functional test case
> that's part of the patch.  Unfortunately the define_insn patters
> had to be duplicated because of the new subreg offsets.  

The number of patterns could possibly be reduced using the define_subst machinery.  I'm looking into
this for some other changes. No need to do this right now. We can do this later on-top.

> Not sure
> whether I've missed any "use" patterns that should be added.

With adding the length operand explicitly to the unspec we should have all the uses of the register
pair covered. To my understanding it is correct to remove these as done with your patch.

+   ; Convert Pmode to BLKmode
+   UNSPEC_REPLICATE_BYTE

The comment does not match.

+++ b/gcc/testsuite/gcc.target/s390/md/setmem_long-1.c
@@ -0,0 +1,64 @@
+/* Machine description pattern tests.  */
+
+/* { dg-do run } */
+/* { dg-options "-mmvcle -dP" } */
...
+/* Check that the right patterns are used.  */
+/* { dg-final { scan-assembler-times {c:12 .*{[*]setmem_long_[36][14]z?}} 1 } } */
+/* { dg-final { scan-assembler-times {c:17 .*{[*]setmem_long_[36][14]z?}} 1 } } */

Don't you need a --save-temps as part of the options?

Apart from these things the patch looks good to me now. I'll wait two days for other comments before
applying it (I can do the remaining changes while doing the commit.).

Thanks!

-Andreas-


> 
> Ciao
> 
> Dominik ^_^  ^_^
>
diff mbox

Patch

From 590e4da997ee294fe4d53e933941cf506691d9f4 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@linux.vnet.ibm.com>
Date: Wed, 2 Dec 2015 10:30:05 +0100
Subject: [PATCH 1.5/1.5] S/390: Make sure the setmem_long_and_patterns are used.

---
 gcc/testsuite/gcc.target/s390/md/setmem_long-1.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/s390/md/setmem_long-1.c b/gcc/testsuite/gcc.target/s390/md/setmem_long-1.c
index dec46ce..0a4a82c 100644
--- a/gcc/testsuite/gcc.target/s390/md/setmem_long-1.c
+++ b/gcc/testsuite/gcc.target/s390/md/setmem_long-1.c
@@ -19,7 +19,13 @@  void test2(char *p, int c, int len)
 
 /* Check that the right patterns are used.  */
 /* { dg-final { scan-assembler-times {c:12 .*{[*]setmem_long_[36][14]z?}} 1 } } */
-/* { dg-final { scan-assembler-times {c:17 .*{[*]setmem_long_[36][14]z?}} 1 } } */
+/* { dg-final { scan-assembler-times {c:17 .*{[*]setmem_long_and_[36][14]z?}} 1 } } */
+
+/* Check that the setmem_long_and pattern is used properly.  */
+/* { dg-final { scan-assembler-not "\tsllg\t" } } */
+/* { dg-final { scan-assembler-not "\tllgcr\t" } } */
+/* { dg-final { scan-assembler-not "\tn\t" } } */
+/* { dg-final { scan-assembler-not "\tllcr\t" } } */
 
 #define LEN 500
 char buf[LEN + 2];
-- 
2.3.0