From patchwork Wed Nov 7 22:08:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 197732 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 706432C00AE for ; Thu, 8 Nov 2012 09:08:59 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352930940; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=tvSFdjW drQ5XtLJpCgQaIFPliFU=; b=nIQsXzQBTrpPIiPwF7uCTdq6qaO8TvvreMCMrFt 3zOygCCQCpfLuT18H1A6ZRSvLQqzokXafhqTahmC+l4sYLI1AtpCoWcry2p6/SXF 2iEOKh2q5gMcalpaHLOKzdVHYTgt8++SrmGHtA8xPnQVlfsQN5Urnhuct8tQYu7q PE2A= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=uUDQ6AIRnE6Qf3dRBZcItVrswBYMtJkp8Dw3kGX9QCTrSjimekT0QZogc+MWUw G3pqCCrkYbJ9yBqVRun+w8Z5ZcmNYpprzUM3pvV7iCY1ozvxVqmf7OGqfO+uZ6uQ srEACumTc6aBZ1Coue1ngwtOKf8yBfXULDM1Kp+VfZtKE=; Received: (qmail 18507 invoked by alias); 7 Nov 2012 22:08:21 -0000 Received: (qmail 18445 invoked by uid 22791); 7 Nov 2012 22:08:20 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Nov 2012 22:08:15 +0000 Received: by mail-pb0-f47.google.com with SMTP id ro12so1447780pbb.20 for ; Wed, 07 Nov 2012 14:08:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.224.9 with SMTP id qy9mr17694901pbc.3.1352326094595; Wed, 07 Nov 2012 14:08:14 -0800 (PST) Received: by 10.66.246.232 with HTTP; Wed, 7 Nov 2012 14:08:14 -0800 (PST) Date: Wed, 7 Nov 2012 23:08:14 +0100 Message-ID: Subject: [PATCH, middle-end]: FIX PR55253, [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou 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 Hello! Attached patch fixes an oversight, introduced in Revision 192641 [1] that caused following testsuite failure on i686: FAIL: gcc.target/i386/pr44948-2a.c (internal compiler error) FAIL: gcc.target/i386/pr44948-2a.c (test for excess errors) As shown in the PR [2], the referred patch activated the call to emit_block_move that was previously effectively dead code (see how modes of temp and target are checked). emit_block_move ICEs when constant is passed to it, so we got ICE for following arguments: (gdb) p debug_rtx (x) (mem/j/c:BLK (plus:SI (reg/f:SI 54 virtual-stack-vars) (const_int -16 [0xfffffffffffffff0])) [0 a.V4SF+0 S16 A128]) $1 = void (gdb) p debug_rtx (y) (const_vector:V4SF [ (const_double:SF 0.0 [0x0.0p+0]) (const_double:SF 1.0e+0 [0x0.8p+1]) (const_double:SF 2.0e+0 [0x0.8p+2]) (const_double:SF 3.0e+0 [0x0.cp+2]) ]) $2 = void The patch simply removes the call to emit_block_move, while still calling copy_blkmode_from_reg when appropriate. The patch fixes the testsuite failure and produces the same code as gcc-4.7. 2012-11-07 Uros Bizjak PR middle-end/55235 * expr.c (store_expr): Do not call emit_block_move for non-BLKmode values. Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}. OK for mainline? [1] http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg00764.html [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235#c3 Uros. Index: expr.c =================================================================== --- expr.c (revision 193296) +++ expr.c (working copy) @@ -5246,19 +5246,12 @@ store_expr (tree exp, rtx target, int call_param_p { if (GET_MODE (target) == BLKmode) { - if (REG_P (temp)) - { - if (TREE_CODE (exp) == CALL_EXPR) - copy_blkmode_from_reg (target, temp, TREE_TYPE (exp)); - else - store_bit_field (target, - INTVAL (expr_size (exp)) * BITS_PER_UNIT, - 0, 0, 0, GET_MODE (temp), temp); - } + if (REG_P (temp) && TREE_CODE (exp) == CALL_EXPR) + copy_blkmode_from_reg (target, temp, TREE_TYPE (exp)); else - emit_block_move (target, temp, expr_size (exp), - (call_param_p - ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL)); + store_bit_field (target, + INTVAL (expr_size (exp)) * BITS_PER_UNIT, + 0, 0, 0, GET_MODE (temp), temp); } else convert_move (target, temp, TYPE_UNSIGNED (TREE_TYPE (exp)));