From patchwork Tue Oct 4 08:50:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 677974 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3spCLS1vzRz9s65 for ; Tue, 4 Oct 2016 19:50:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=AhxxWDi/; dkim-atps=neutral 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:subject:message-id:mime-version:content-type; q=dns; s= default; b=ayTYUJwSR5xtVjZ85MpNQ+naSB1KTcKc9EO7HQrWplqyAHvk8z2J7 RSfV2N+/vvJF1FLyTqvgWfHlaCoO0HfXdcEbDtehN8aM8t17duJTRbfxBevde31c oHXzbZADv/P4pN4FzcGzKZIRCFJbiUDiePSxu5lEwvTSKJ7AoidAzk= 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:subject:message-id:mime-version:content-type; s= default; bh=CxP0agaDKHf5dHtcl71Ht5tWQH8=; b=AhxxWDi/Ed270xpwy+TO xeOtrOzSk7StmsL7T0UX0FJ0rdvFVaz8EzQKGGQf9McDQAEgj6Rd40Xqxu61TtgB aZuSBAlgpCE9L+MIPxRSRGTSb7JUnAjVD8SiO6ER9scBM30Ju+3SB/7HMCALE5q+ 42WCuFZf9krlkTM0UmXGuJc= Received: (qmail 30723 invoked by alias); 4 Oct 2016 08:50:47 -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 30710 invoked by uid 89); 4 Oct 2016 08:50:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=sites, x86_64**, x86_64-*-*, Hx-languages-length:1933 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Oct 2016 08:50:36 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 27F34AC93 for ; Tue, 4 Oct 2016 08:50:33 +0000 (UTC) Date: Tue, 4 Oct 2016 10:50:33 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix fallout of PR77399 fix Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Andreas noticed I forgot to check if the target can fix/float a vector. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. Verified the fix with a cross to ia64-linux. Richard. 2016-10-04 Richard Biener PR tree-optimization/77399 * tree-ssa-forwprop.c (simplify_vector_constructor): Properly verify the target can convert. * gcc.dg/tree-ssa/forwprop-35.c: Adjust. Index: gcc/tree-ssa-forwprop.c =================================================================== --- gcc/tree-ssa-forwprop.c (revision 240739) +++ gcc/tree-ssa-forwprop.c (working copy) @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. #include "builtins.h" #include "tree-cfgcleanup.h" #include "cfganal.h" +#include "optabs-tree.h" /* This pass propagates the RHS of assignment statements into use sites of the LHS of the assignment. It's basically a specialized @@ -2037,6 +2038,13 @@ simplify_vector_constructor (gimple_stmt != TYPE_VECTOR_SUBPARTS (TREE_TYPE (orig)))) return false; + tree tem; + if (conv_code != ERROR_MARK + && (! supportable_convert_operation (conv_code, type, TREE_TYPE (orig), + &tem, &conv_code) + || conv_code == CALL_EXPR)) + return false; + if (maybe_ident) { if (conv_code == ERROR_MARK) Index: gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c =================================================================== --- gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c (revision 240739) +++ gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c (working copy) @@ -14,5 +14,5 @@ v4sf vec_cast_perm(v4si f) return (v4sf){f[1], f[1], f[2], f[3]}; } -/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 1 "cddce1" } } */ -/* { dg-final { scan-tree-dump-times "\\\(v4sf\\\) " 2 "cddce1" } } */ +/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 1 "cddce1" { target x86_64-*-* } } } */ +/* { dg-final { scan-tree-dump-times "\\\(v4sf\\\) " 2 "cddce1" { target x86_64-*-* } } } */