diff mbox

S/390: Improve result verification in test case vec-genmask-1.c.

Message ID 20160818090006.GA22139@linux.vnet.ibm.com
State New
Headers show

Commit Message

Dominik Vogt Aug. 18, 2016, 9 a.m. UTC
THe attached patch improves checking of teh results of the
subtests "a" and "f".  As they share the same "vone" instruction,
the duplicate scan-assembler-times was bogus.  Moved "f" to a
separate function to fix this.  Also double check that no extra
"vgmf" instructions are used.

Ciao

Dominik ^_^  ^_^

Comments

Andreas Krebbel Aug. 23, 2016, 9:10 a.m. UTC | #1
> gcc/testsuite/ChangeLog
> 
> 	* gcc.target/s390/zvector/vec-genmask-1.c: Improve result verification.

Applies.  Thanks!

-Andreas-
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/s390/zvector/vec-genmask-1.c b/gcc/testsuite/gcc.target/s390/zvector/vec-genmask-1.c
index 745c1ed..0e57b8d 100644
--- a/gcc/testsuite/gcc.target/s390/zvector/vec-genmask-1.c
+++ b/gcc/testsuite/gcc.target/s390/zvector/vec-genmask-1.c
@@ -14,11 +14,19 @@  foo ()
   c = vec_genmasks_32 (31, 31);
   d = vec_genmasks_32 (5, 5);
   e = vec_genmasks_32 (31, 0);
+}
+
+int
+bar ()
+{
+  /* Needs to be in a separate function so that the vone from "a" is not reused
+     for "f".  */
   f = vec_genmasks_32 (6, 5);
 }
-/* { dg-final { scan-assembler-times "vone" 1 } } */
-/* { dg-final { scan-assembler-times "vgmf\t%v.*,0,0" 1 } } */
-/* { dg-final { scan-assembler-times "vgmf\t%v.*,31,31" 1 } } */
-/* { dg-final { scan-assembler-times "vgmf\t%v.*,5,5" 1 } } */
-/* { dg-final { scan-assembler-times "vgmf\t%v.*,31,0" 1 } } */
-/* { dg-final { scan-assembler-times "vone" 1 } } */
+
+/* a + f: { dg-final { scan-assembler-times "vone" 2 } } */
+/* b: { dg-final { scan-assembler-times "vgmf\t%v.*,0,0" 1 } } */
+/* c: { dg-final { scan-assembler-times "vgmf\t%v.*,31,31" 1 } } */
+/* d: { dg-final { scan-assembler-times "vgmf\t%v.*,5,5" 1 } } */
+/* e: { dg-final { scan-assembler-times "vgmf\t%v.*,31,0" 1 } } */
+/* b - e: { dg-final { scan-assembler-times "vgmf" 4 } } */