From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12110 invoked by alias); 14 Nov 2012 18:56:42 -0000 Received: (qmail 12059 invoked by uid 48); 14 Nov 2012 18:56:24 -0000 From: "sergos.gnu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/54717] [4.8 Regression] Runtime regression: polyhedron test "rnflow" degraded Date: Wed, 14 Nov 2012 18:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sergos.gnu at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg01279.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54717 --- Comment #12 from Sergey Ostanevich 2012-11-14 18:56:22 UTC --- Actually, it is not. I found that PRE did not collected a memory access within the loop that caused later missing vectorization. Here is dump before (good one) and after the commit (bad one) : pretmp_263 = (integer(kind=8)) ival2_82; pretmp_264 = pretmp_263 + -1; pretmp_265 = *xxtrt_46(D)[pretmp_264]; : # ival2_10 = PHI # ival2_14 = PHI # prephitmp_266 = PHI _83 = (integer(kind=8)) ival2_10; _84 = _83 + -1; _85 = *xxtrt_46(D)[_84]; _86 = (integer(kind=8)) ival2_14; _87 = _86 + -1; _88 = prephitmp_266; if (_85 < _88) goto ; else goto ; : goto ; : : # ival2_15 = PHI # prephitmp_237 = PHI <_88(90), _85(29)> ival2_89 = ival2_10 + -1; if (ival2_10 == ipos1_12) goto ; else goto ; : goto ; --------------------------------- : : # ival2_10 = PHI # ival2_14 = PHI _83 = (integer(kind=8)) ival2_10; _84 = _83 + -1; _85 = *xxtrt_46(D)[_84]; _86 = (integer(kind=8)) ival2_14; _87 = _86 + -1; _88 = *xxtrt_46(D)[_87]; if (_85 < _88) goto ; else goto ; : goto ; : : # ival2_15 = PHI ival2_89 = ival2_10 + -1; if (ival2_10 == ipos1_12) goto ; else goto ; : goto ; ------------------------- So for the loop that starting at bb 28 you can see the xxtrt_46 access was not put into pretemp. Possible reason is exactly as it was mentioned by Richard - there were extra candidates collected and this one become less anticipatable Skipping partial partial redundancy for expression {array_ref,mem_ref<0B>,xxtrt_46(D)}@.MEM_30(D) (0165) not partially anticipated on any to be optimized for speed edges ----------------------------------------------------------------------- Found partial partial redundancy for expression {array_ref,mem_ref<0B>,xxtrt_46(D)}@.MEM_30(D) (0165) Created phi prephitmp_237 = PHI <_88(90), _85(29)> in block 30