From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 516D2389847E; Wed, 5 Jun 2024 21:05:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 516D2389847E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717621528; bh=NFNa0yGrxAW5artx3/XwBRZ1UnNS1s+8T6IBU8xgELI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VuX7MM3FagdlmmfpeQ4zUHIrnxr7O2g61ILEh3NS4kQvl0k5UOYFJvyBVnGomMp7K R6zo4Xu5kLBUezIPYKy30P8pHBrm93GTIMRLQUtdLFfls/1hX5pwxTpOr8d5DCAbni x97HaFgHys1HwajG+0FhPgmqm5xhms4kFBZcL0NE= From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115355] [12/13/14/15 Regression] PPCLE: Auto-vectorization creates wrong code for Power9 Date: Wed, 05 Jun 2024 21:05:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115355 --- Comment #7 from Peter Bergner --- The test fails when setToIdentityBAD's index var is unsigned int. It passes when using unsigned long long, unsigned long, unsigned short and unsigned c= har. When using unsigned long long/unsigned long, we do no vectorize the loop. = We vectorize the loop when using unsigned int/short/char. The vectorized code= is a little strange, in that the smaller the integer type we use for the index var, the more code we generate.=20=20 The vectorized code for unsigned char is truly huge! ...although it does s= eem to work correctly. I'm attaching the "unsigned char i" code gen for setToIdentityBAD for people to examine. Even though it gives "correct" results, it can't really be the code we want to generate, correct???=