From patchwork Thu Aug 5 11:17:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 60952 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]) by ozlabs.org (Postfix) with SMTP id 3F152B70A9 for ; Thu, 5 Aug 2010 21:18:07 +1000 (EST) Received: (qmail 18418 invoked by alias); 5 Aug 2010 11:18:05 -0000 Received: (qmail 18408 invoked by uid 22791); 5 Aug 2010 11:18:05 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-fx0-f47.google.com (HELO mail-fx0-f47.google.com) (209.85.161.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 11:17:28 +0000 Received: by fxm12 with SMTP id 12so3166326fxm.20 for ; Thu, 05 Aug 2010 04:17:26 -0700 (PDT) Received: by 10.223.104.136 with SMTP id p8mr10371454fao.105.1281007046592; Thu, 05 Aug 2010 04:17:26 -0700 (PDT) Received: from [93.103.18.160] (93-103-18-160.static.t-2.net [93.103.18.160]) by mx.google.com with ESMTPS id c5sm25004fac.19.2010.08.05.04.17.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Aug 2010 04:17:25 -0700 (PDT) Subject: Re: [PATCH, rtl]: Do not generate insns with mismatched REG_EQUAL mode for multiword MULT RTXes. From: Uros Bizjak To: Steven Bosscher Cc: gcc-patches@gcc.gnu.org In-Reply-To: References: Date: Thu, 05 Aug 2010 13:17:23 +0200 Message-ID: <1281007043.26270.1.camel@localhost> Mime-Version: 1.0 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 On Thu, 2010-08-05 at 10:46 +0200, Uros Bizjak wrote: > 2010-08-04 Uros Bizjak > > * expmed.c (expand_mult_const) : Expand shift into > temporary. Emit move from temporary to accum, so REG_EQUAL note will > be attached to this insn in correct mode. > > This patch fixes original ivopts failure as well. > > Patch is currently regression testing on x86_64-pc-linux-gnu. OK for > mainline and release branches, if it passes testing? > Regression tests passed OK. Also, I have added a comment to the patch, see attached. Uros. Index: expmed.c =================================================================== --- expmed.c (revision 162899) +++ expmed.c (working copy) @@ -2904,9 +2904,11 @@ expand_mult_const (enum machine_mode mod switch (alg->op[opno]) { case alg_shift: - accum = expand_shift (LSHIFT_EXPR, mode, accum, - build_int_cst (NULL_TREE, log), - NULL_RTX, 0); + tem = expand_shift (LSHIFT_EXPR, mode, accum, + build_int_cst (NULL_TREE, log), + NULL_RTX, 0); + /* REG_EQUAL note will be attached to the following insn. */ + emit_move_insn (accum, tem); val_so_far <<= log; break;