From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0334385DC0B; Thu, 23 Apr 2020 13:26:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0334385DC0B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587648397; bh=iDPV/tA02MA/dKS6EmEkL5s5oRooTK8uljyMcHlSOYM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Tuhyz9OEvPSV39hJxd3Xjvdf02NKnF47EwUqhz79IR9uqYGGazR1CWtY8R7XLULix NJ4ptIUSrVsb+2fFDhwBZZOyiVdpYkS3ZhmyEBMFyxXiPdjQPX6bZYDWpXtfYG7iU3 wILJ+6UQzZxx+pi347pLh/9D8LD9cbkHsUd5GcEY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/92645] Hand written vector code is 450 times slower when compiled with GCC compared to Clang Date: Thu, 23 Apr 2020 13:26:37 +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-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Thu, 23 Apr 2020 13:26:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D92645 --- Comment #23 from Richard Biener --- So the issue is we're both not doing enough and too much, the half way early optimizations do confuse us later. Another such opportunity would maybe be: short unsigned int _950; _950 =3D BIT_FIELD_REF <_58, 16, 240>; _253 =3D (unsigned char) _950; where this is the only use of _950. It might be tempting to "optimize" this into _253 =3D BIT_FIELD_REF <_58, 8, 240>; forwprop does similar transforms for loads of complex and vector (though the above is not a load but the transform would extend to loads as well).=