From patchwork Mon Sep 9 07:23:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Zolotukhin X-Patchwork-Id: 273503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 915402C0121 for ; Mon, 9 Sep 2013 17:23:57 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=JUJ7CeW5IZiR4eyfN pac0faz2VlaN0V/QkbrqLZiapVGWRaJJF6cUvxsBBP0zqy/yTkMKR33Ly/lva6gQ owQVC8xstY/RW3zkX2aIIWvVlsXXR1+XJOFVRXpqpoyEaHWM+VNbF4h3nP37SS0W Sg3xoE0hyFaZEhylgg5ulerLl8= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=XY7rFIb71VxliLGhTpfApZM pWCA=; b=PEb4yd5Ql7RuqGIRwluoH7Gq/m+JMy3TXuYPTP4aRcPoo3VgMsF0Jbi 5fZwt2bIgPiT4Oj4a1IJ4Q4UFIkgQdYP76m0XRlNqWMAVcTXEkGp/Ix08IouL05m 2rrMPAi2h0if9JgLihUUpaKJJrHAYcwC8//fTUdXyt8uIUq5N9nA= Received: (qmail 24227 invoked by alias); 9 Sep 2013 07:23:51 -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 24215 invoked by uid 89); 9 Sep 2013 07:23:51 -0000 Received: from mail-pb0-f46.google.com (HELO mail-pb0-f46.google.com) (209.85.160.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 09 Sep 2013 07:23:51 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00, FREEMAIL_FROM autolearn=ham version=3.3.2 X-HELO: mail-pb0-f46.google.com Received: by mail-pb0-f46.google.com with SMTP id rq2so5734649pbb.5 for ; Mon, 09 Sep 2013 00:23:48 -0700 (PDT) X-Received: by 10.66.178.143 with SMTP id cy15mr18591992pac.105.1378711428881; Mon, 09 Sep 2013 00:23:48 -0700 (PDT) Received: from msticlxl57.ims.intel.com (fmdmzpr04-ext.fm.intel.com. [192.55.55.39]) by mx.google.com with ESMTPSA id xe9sm15746248pab.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Sep 2013 00:23:48 -0700 (PDT) Date: Mon, 9 Sep 2013 11:23:17 +0400 From: "Michael V. Zolotukhin" To: "H.J. Lu" Cc: Eric Botcazou , Kirill Yukhin , GCC Patches , Jan Hubicka , Ond??ej B?lka , Uros Bizjak Subject: Re: [PATCH, x86] Use vector moves in memmove expanding Message-ID: <20130909072317.GA53568@msticlxl57.ims.intel.com> References: <20130705112534.GA10164@kam.mff.cuni.cz> <7703907.JSoGtmLQkn@polaris> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi HJ, You were right, and the change from epilogue_size_needed to size_needed was the rootcause of the bug. Here is the obvious fix for that, regtested and bootstrapped on i386/x86_64. Is it OK for trunk? Changelog: 2013-09-09 Michael Zolotukhin * config/i386/i386.c (ix86_expand_movmem): Fix epilogue generation. --- Thanks, Michael diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e2fa71a..1f07e6f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -23329,7 +23329,7 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp, if (count_exp != const0_rtx && epilogue_size_needed > 1) expand_movmem_epilogue (dst, src, destreg, srcreg, count_exp, - size_needed); + epilogue_size_needed); if (jump_around_label) emit_label (jump_around_label); return true;