From patchwork Mon Jan 18 12:44:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 569535 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 E1EA214076E for ; Mon, 18 Jan 2016 23:44:19 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ptXq4Z/6; 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=r+RboIP/j1D4XWJUBt 1WMGgvUxpeT95uSpaA4QrokOM3PWyaCc4Vzu3wUgDTbB7iQRZgPZmcZUHHbLi8hC LmPIzSb84G/NlgeGEKDWvVZP/gUDyMiFTigxN0WjNxv+uYB5NjzM6SCnXPFdRmu5 ARdT87svD17v4Dhz5O1bcm3QA= 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:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=7Cy4Dbp0K2hMQCbar5ws0Z8E x50=; b=ptXq4Z/6TzqXGtViowK9H+q671ywJ/oIcbhNdMw6le6PF5hcRGs6vRrb 1iMUkyXDgr1tCUojSoU665MBNSpdJiu1IR3XTMpIZAstqLUmU5iEIU9Bgf+Q6M1v H1cW2OY+5D1ofcKlvHzquuhYEkKxRG0Iy30ArzJfCVCK0ZWln+g= Received: (qmail 76062 invoked by alias); 18 Jan 2016 12:44:12 -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 76025 invoked by uid 89); 18 Jan 2016 12:44:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=invert, predicates, sk:SCALAR_, remarks X-HELO: mail-yk0-f194.google.com Received: from mail-yk0-f194.google.com (HELO mail-yk0-f194.google.com) (209.85.160.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 18 Jan 2016 12:44:10 +0000 Received: by mail-yk0-f194.google.com with SMTP id v14so38011728ykd.1 for ; Mon, 18 Jan 2016 04:44:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=mb84e6xsi8g8d54B83b+y7QPLSIF2NtG/XJCMRnTZek=; b=JI9PCglFOQFe5WpEr+eTjBrYAf5h0/WHqxe5tyElWQ2uHNcvka4Dc9K8xpEbTm0GRt sNq4hwkFnb0gP86fMQ+o+6jDZcnVP4aKjV0u3bZw97Q2e3TNUGgsPccvJjgJ6H+o+YZx BdhuL+Us7DDBVLfwF47qQSivmOYkXAPQiWR4/k9XtdEHhwiC5nZ9rYQ/BdCqaTU1FcIC PgTXt9+EMgwj2eOuZ3AQqrRS/xcFJQKdvColhk1oLwfSdg3QSCErnuUj8SjZ8l6pXe9y NLFn2VTenu+qvHRt3YKy/IdmOxseo5ggG2KmEI9q8EzqGyh2uPm2f2kk/zkJCx6Gt78G d0tw== X-Gm-Message-State: ALoCoQl6j9FRA/No9q7OVAy+VhHsO8sT8n2NeEd5y/hCDdcsgiL0ygkLaxOhd4gBcdlTUIeDOsra8s3T/p3wfEMkfDsWLuR1KA== MIME-Version: 1.0 X-Received: by 10.37.230.198 with SMTP id d189mr4969814ybh.74.1453121048007; Mon, 18 Jan 2016 04:44:08 -0800 (PST) Received: by 10.37.202.82 with HTTP; Mon, 18 Jan 2016 04:44:07 -0800 (PST) In-Reply-To: References: Date: Mon, 18 Jan 2016 13:44:07 +0100 Message-ID: Subject: Re: [PATCH PR68542] From: Richard Biener To: Yuri Rumyantsev Cc: gcc-patches , Igor Zamyatin , Kirill Yukhin X-IsSubscribed: yes On Mon, Jan 11, 2016 at 11:06 AM, Yuri Rumyantsev wrote: > Hi Richard, > > Did you have anu chance to look at updated patch? Ok with that change. Thanks, Richard. > Thanks. > Yuri. > > 2015-12-18 13:20 GMT+03:00 Yuri Rumyantsev : >> Hi Richard, >> >> Here is updated patch for middle-end part of the whole patch which >> fixes all your remarks I hope. >> >> Regression testing and bootstrapping did not show any new failures. >> Is it OK for trunk? >> >> Yuri. >> >> ChangeLog: >> 2015-12-18 Yuri Rumyantsev >> >> PR middle-end/68542 >> * fold-const.c (fold_binary_op_with_conditional_arg): Bail out for case >> of mixind vector and scalar types. >> (fold_relational_const): Add handling of vector >> comparison with boolean result. >> * tree-cfg.c (verify_gimple_comparison): Add argument CODE, allow >> comparison of vector operands with boolean result for EQ/NE only. >> (verify_gimple_assign_binary): Adjust call for verify_gimple_comparison. >> (verify_gimple_cond): Likewise. >> * tree-ssa-forwprop.c (combine_cond_expr_cond): Do not perform diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index acbb70b..208a752 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5771,6 +5771,10 @@ register_edge_assert_for (tree name, edge e, gimple_stmt_iterator si, &comp_code, &val)) return; + /* VRP doesn't track ranges for vector types. */ + if (TREE_CODE (TREE_TYPE (name)) == VECTOR_TYPE) + return; + please instead fix extract_code_and_val_from_cond_with_ops with Index: gcc/tree-vrp.c =================================================================== --- gcc/tree-vrp.c (revision 232506) +++ gcc/tree-vrp.c (working copy) @@ -5067,8 +5067,9 @@ extract_code_and_val_from_cond_with_ops if (invert) comp_code = invert_tree_comparison (comp_code, 0); - /* VRP does not handle float types. */ - if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (val))) + /* VRP only handles integral and pointer types. */ + if (! INTEGRAL_TYPE_P (TREE_TYPE (val)) + && ! POINTER_TYPE_P (TREE_TYPE (val))) return false; /* Do not register always-false predicates.