From: Vladimir Makarov Date: Fri, 27 Mar 2015 14:47:24 +0000 (+0000) Subject: re PR target/65407 (Extra mask register move in gcc.target/i386/avx512f-kandnw-1.c) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d81c5030d1ca9920bc41de91819cef17c83a8805;p=gcc.git re PR target/65407 (Extra mask register move in gcc.target/i386/avx512f-kandnw-1.c) 2015-03-27 Vladimir Makarov PR target/65407 * ira-costs.c (record_reg_classes): Process all constraint string containing 0-9. 2015-03-27 Vladimir Makarov PR target/65407 * gcc.target/i386/avx512f-kandnw-1.c: Add scanning kmovw. From-SVN: r221734 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5535f9df08..05b193bad28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-03-27 Vladimir Makarov + + PR target/65407 + * ira-costs.c (record_reg_classes): Process all constraint string + containing 0-9. + 2015-03-27 Bernd Schmidt * config/c6x/c6x.md (movmisalign): Use MEM_P, not diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index c19f2586aff..354ba6ba063 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -589,7 +589,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, while (*p == '%' || *p == '=' || *p == '+' || *p == '&') p++; - if (p[0] >= '0' && p[0] <= '0' + i && (p[1] == ',' || p[1] == 0)) + if (p[0] >= '0' && p[0] <= '0' + i) { /* Copy class and whether memory is allowed from the matching alternative. Then perform any needed cost @@ -754,14 +754,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, && ! find_reg_note (insn, REG_DEAD, op)) alt_cost += 2; - /* This is in place of ordinary cost computation for - this operand, so skip to the end of the - alternative (should be just one character). */ - while (*p && *p++ != ',') - ; - - constraints[i] = p; - continue; + p++; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1ee29dd3f61..69a1cdadc48 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-03-27 Vladimir Makarov + + PR target/65407 + * gcc.target/i386/avx512f-kandnw-1.c: Add scanning kmovw. + 2015-03-27 Andre Vehreschild * gfortran.dg/unlimited_polymorphic_24.f03: Added copyright diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c index 17b7b295a0e..727a5890783 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mavx512f -O2" } */ /* { dg-final { scan-assembler-times "kandnw\[ \\t\]+\[^\{\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "kmovw" 2 } } */ #include