From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E2053857C53; Wed, 16 Sep 2020 06:29:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E2053857C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600237779; bh=SJaZErw1kGAOLSVpHTG2Yp7qaEaeSLC7Td/m8F11cmU=; h=From:To:Subject:Date:From; b=R0oNepZpb+vW1nxOGpl0/Igv+ingBQf/n0GsJNWfTXYPCLLRCYP+XAA2Exe11nX1q idnNQuIG9wJFZezGr8M5wi+xp2ulKyGOyfqqEj3pFXGpbKIJFwMpagPqyKTeDDZbeY TwiiJ04a+skpWBHWbJV5DjsT5gjewwAHWsM5vwHg= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97064] New: BB vectorization behaves sub-optimal Date: Wed, 16 Sep 2020 06:29:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2020 06:29:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97064 Bug ID: 97064 Summary: BB vectorization behaves sub-optimal Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- The testcase g++.dg/vect/slp-pr87105.cc ends in _64 =3D MIN_EXPR <_32, _87>; bBox_6(D)->x0 =3D _64; _67 =3D MIN_EXPR <_33, _86>; bBox_6(D)->y0 =3D _67; _70 =3D MAX_EXPR <_36, _87>; bBox_6(D)->x1 =3D _70; _73 =3D MAX_EXPR <_39, _86>; bBox_6(D)->y1 =3D _73; thus feeding a 4 element store with a non-uniform SLP opportunity starting with { MIN, MIN, MAX, MAX }. With 2-element vector type vectorization this eventually gets vectorized by splitting the group which is prioritized over just building the { MIN..., MAX } vector from scalars but with 4-element vector type vectorization no splitting is considered and we end up successfully vectorizing just the store with never considering the smaller vector size. So at the moment the testcase PASSes with SSE but fails with AVX.=