From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 687E5385781B; Fri, 2 Apr 2021 19:51:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 687E5385781B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work044)] Revert patch. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work044 X-Git-Oldrev: a67dde6a82f9277d6fb4d4abd841c92028b17568 X-Git-Newrev: dc947f6c16c039867f01237df26e94da62a7c29d Message-Id: <20210402195155.687E5385781B@sourceware.org> Date: Fri, 2 Apr 2021 19:51:55 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 19:51:55 -0000 https://gcc.gnu.org/g:dc947f6c16c039867f01237df26e94da62a7c29d commit dc947f6c16c039867f01237df26e94da62a7c29d Author: Michael Meissner Date: Fri Apr 2 15:51:06 2021 -0400 Revert patch. Switch power10 XXSPLTIW built-ins to use VEC_DUPLICATE. This patch switches the power10 vec_splati and vec_splatid built-in functions to use the XXSPLTIB support instead of using UNSPECs. gcc/ 2021-04-02 Michael Meissner Revert patch. * config/rs6000/altivec.md (UNSPEC_XXSPLTIW): Delete. (xxspltiw_v4si): Rewrite to use VEC_DUPLICATE. (xxspltiw_v4sf): Rewrite to use VEC_DUPLICATE. (xxspltiw_v4sf_inst): Delete. Diff: --- gcc/config/rs6000/altivec.md | 48 ++++++++++++---------- .../gcc.target/powerpc/vec-splati-runnable.c | 4 +- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index 65148b0986c..1351dafbc41 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -176,6 +176,7 @@ UNSPEC_VSTRIL UNSPEC_SLDB UNSPEC_SRDB + UNSPEC_XXSPLTIW UNSPEC_XXSPLTID UNSPEC_XXSPLTI32DX UNSPEC_XXBLEND @@ -820,31 +821,34 @@ [(set_attr "type" "vecsimple")]) (define_insn "xxspltiw_v4si" - [(set (match_operand:V4SI 0 "register_operand" "=wa,wa,v,wa") - (vec_duplicate:V4SI - (match_operand 1 "s32bit_cint_operand" "O,wM,wB,n")))] - "TARGET_XXSPLTIW" - "@ - xxspltisb %x0,0 - xxspltisb %x0,255 - vspltisw %0,%1 - xxspltiw %x0,%1" - [(set_attr "type" "vecperm") - (set_attr "prefixed" "*,*,*,yes")]) - -(define_insn "xxspltiw_v4sf" - [(set (match_operand:V4SF 0 "register_operand" "=wa,wa") - (vec_duplicate:V4SF - (match_operand:SF 1 "const_double_operand" "F,F")))] - "TARGET_XXSPLTIW" -{ - if (operands[1] == CONST0_RTX (SFmode)) - return "xxspltib %x0,0"; + [(set (match_operand:V4SI 0 "register_operand" "=wa") + (unspec:V4SI [(match_operand:SI 1 "s32bit_cint_operand" "n")] + UNSPEC_XXSPLTIW))] + "TARGET_POWER10" + "xxspltiw %x0,%1" + [(set_attr "type" "vecsimple") + (set_attr "prefixed" "yes")]) - operands[2] = GEN_INT (rs6000_const_f32_to_i32 (operands[1])); - return "xxspltiw %x0,%2"; +(define_expand "xxspltiw_v4sf" + [(set (match_operand:V4SF 0 "register_operand" "=wa") + (unspec:V4SF [(match_operand:SF 1 "const_double_operand" "n")] + UNSPEC_XXSPLTIW))] + "TARGET_POWER10" +{ + long long value = rs6000_const_f32_to_i32 (operands[1]); + emit_insn (gen_xxspltiw_v4sf_inst (operands[0], GEN_INT (value))); + DONE; }) +(define_insn "xxspltiw_v4sf_inst" + [(set (match_operand:V4SF 0 "register_operand" "=wa") + (unspec:V4SF [(match_operand:SI 1 "c32bit_cint_operand" "n")] + UNSPEC_XXSPLTIW))] + "TARGET_POWER10" + "xxspltiw %x0,%1" + [(set_attr "type" "vecsimple") + (set_attr "prefixed" "yes")]) + (define_expand "xxspltidp_v2df" [(set (match_operand:V2DF 0 "register_operand" ) (unspec:V2DF [(match_operand:SF 1 "const_double_operand")] diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c index f65a336b69c..8edabe97cb0 100644 --- a/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c +++ b/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c @@ -160,8 +160,6 @@ main (int argc, char *argv []) return 0; } -/* { dg-final { scan-assembler-times {\mxxspltiw\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mxxspltiw\M} 3 } } */ /* { dg-final { scan-assembler-times {\mxxspltidp\M} 2 } } */ /* { dg-final { scan-assembler-times {\mxxsplti32dx\M} 3 } } */ - -