From patchwork Wed Jun 1 11:37:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ira Rosen X-Patchwork-Id: 1705 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:54:32 -0000 Delivered-To: patches@linaro.org Received: by 10.52.181.10 with SMTP id ds10cs301114vdc; Wed, 1 Jun 2011 04:37:14 -0700 (PDT) Received: by 10.220.118.80 with SMTP id u16mr2494346vcq.214.1306928234355; Wed, 01 Jun 2011 04:37:14 -0700 (PDT) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by mx.google.com with ESMTPS id 14si687086vcs.157.2011.06.01.04.37.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 04:37:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of ira.rosen@linaro.org) client-ip=209.85.216.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of ira.rosen@linaro.org) smtp.mail=ira.rosen@linaro.org Received: by qyk2 with SMTP id 2so3421515qyk.16 for ; Wed, 01 Jun 2011 04:37:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.196.136 with SMTP id eg8mr450145qab.242.1306928232804; Wed, 01 Jun 2011 04:37:12 -0700 (PDT) Received: by 10.224.60.74 with HTTP; Wed, 1 Jun 2011 04:37:12 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jun 2011 14:37:12 +0300 Message-ID: Subject: Re: [patch] Improve detection of widening multiplication in the vectorizer From: Ira Rosen To: Richard Guenther Cc: gcc-patches@gcc.gnu.org, Patch Tracking On 1 June 2011 12:42, Richard Guenther wrote: > Did you think about moving pass_optimize_widening_mul before > loop optimizations?  Does that pass catch the cases you are > teaching the pattern recognizer?  I think we should try to expose > these more complicated instructions to loop optimizers. > pass_optimize_widening_mul doesn't catch these cases, but I can try to teach it instead of the vectorizer. I am now testing to see how it affects other loop optimizations (vectorizer pattern tests obviously fail). Thanks, Ira > Thanks, > Richard. > Index: passes.c =================================================================== --- passes.c (revision 174391) +++ passes.c (working copy) @@ -870,6 +870,7 @@ NEXT_PASS (pass_split_crit_edges); NEXT_PASS (pass_pre); NEXT_PASS (pass_sink_code); + NEXT_PASS (pass_optimize_widening_mul); NEXT_PASS (pass_tree_loop); { struct opt_pass **p = &pass_tree_loop.pass.sub; @@ -934,7 +935,6 @@ NEXT_PASS (pass_forwprop); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_fold_builtins); - NEXT_PASS (pass_optimize_widening_mul); NEXT_PASS (pass_tail_calls); NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_uncprop);