From patchwork Wed Oct 10 15:05:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 981940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-487261-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="s3mMCu0a"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ja2WSghh"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Vcqb5Z5Yz9s8F for ; Thu, 11 Oct 2018 02:06:02 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=b+oi3Xsci6l087c4wqXzu7QRTY+FCuEbRgTvh6sdvuUKYy jfbBWjjGCV8AQFYDAhhwX1OP/CRzJ25Wzd5J1IE6qQQxOQ8VNSPG79BVjw5vRrHO vnkwEyagKOgggZA/UVfx0bbyUTrefmNUoHFpLlo/wZgMinq+08Te9MVvEVnDw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=Hpu07ux53Flr/AbMjDngE7FakcY=; b=s3mMCu0ahEbgHvUhIQQz muHXyiFUw5ONN4wwuw8IRLMNybDhuh53AOLNHCftGVgzLQ67FO6eQPn6rJbmQPKt Rtm6ulWBIvF4okQsnjr+LtdxBh7S2ytHkHqMoCbfRMQ3t/xnGvKKioce0PCSNqBG c3U9gcPRnSANb5E1Fu7TE/U= Received: (qmail 89370 invoked by alias); 10 Oct 2018 15:05:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 89334 invoked by uid 89); 10 Oct 2018 15:05:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-it1-f172.google.com Received: from mail-it1-f172.google.com (HELO mail-it1-f172.google.com) (209.85.166.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Oct 2018 15:05:53 +0000 Received: by mail-it1-f172.google.com with SMTP id q70-v6so8521703itb.3 for ; Wed, 10 Oct 2018 08:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=NV4cijgIFTVvFUKp7zGTvWBBg4vyPZVGh4hzNSVyzUw=; b=Ja2WSghhIvxQ/qkL6qElOINJ2AVR4+mwL/F+Rt9guXtiCxgWaZV7EPNBW0vL1KDiBa jhp9UZh1FEs7C5F/5YpLgkbyIqp1YBjNGNvnMffa7TmICI5RLZREcizgSMaCShELrgG+ 0PQFbqST80tzstc87qdD/DXpyn2llry8m3S8fhEyr1dYWXpSsDGK6009MLhKZLani35u fOFE4gHMKZ1xm49oN9EyNGpqw/s9wBna7oJMxIGR85xz7JA2dM3Ya7yDecjyESYruQWG nF0d6qVkKodbATVMG8SWYmnzPHRwmbm84aZt9d6XQvlUIvKgY8CcYW+3g4BUC/eZv9LD iTZg== MIME-Version: 1.0 From: Uros Bizjak Date: Wed, 10 Oct 2018 17:05:39 +0200 Message-ID: Subject: [PATCH, i386]: Fix PR87573, error: could not split insn To: "gcc-patches@gcc.gnu.org" Existing splitter is not able to split const_vector 0 as general_operand predicate matches only scalar zeros. 2018-10-10 Uros Bizjak PR target/87573 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter. testsuite/ChangeLog: 2018-10-10 Uros Bizjak PR target/87573 * gcc.target/i386/pr87573.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros. Index: config/i386/mmx.md =================================================================== --- config/i386/mmx.md (revision 265018) +++ config/i386/mmx.md (working copy) @@ -217,11 +217,18 @@ (define_split [(set (match_operand:MMXMODE 0 "nonimmediate_gr_operand") - (match_operand:MMXMODE 1 "general_gr_operand"))] + (match_operand:MMXMODE 1 "nonimmediate_gr_operand"))] "!TARGET_64BIT && reload_completed" [(const_int 0)] "ix86_split_long_move (operands); DONE;") +(define_split + [(set (match_operand:MMXMODE 0 "nonimmediate_gr_operand") + (match_operand:MMXMODE 1 "const0_operand"))] + "!TARGET_64BIT && reload_completed" + [(const_int 0)] + "ix86_split_long_move (operands); DONE;") + (define_expand "movmisalign" [(set (match_operand:MMXMODE 0 "nonimmediate_operand") (match_operand:MMXMODE 1 "nonimmediate_operand"))] Index: testsuite/gcc.target/i386/pr87573.c =================================================================== --- testsuite/gcc.target/i386/pr87573.c (nonexistent) +++ testsuite/gcc.target/i386/pr87573.c (working copy) @@ -0,0 +1,12 @@ +/* PR target/87573 */ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O1 -mmmx -mno-sse" } */ + +typedef char __v8qi __attribute__((vector_size(8))); + +__v8qi e; + +void f (void) +{ + e = (__v8qi) {0, 0, 0, 0, 0, 0, 0, 0}; +}