From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69C21385841F; Thu, 22 Feb 2024 08:57:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69C21385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708592242; bh=LK4EZzge39a2tuYjyysxUxeSNjb6l+SEKVqxKpNtbGQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=REyXU7/YjENxz7o9CYf4xJLpYx4+gQPz4/DoCts91WqeTJsKvUaxr3kxizvhJ3wj5 U7eooVWisIIS6BE7Y7vfaS1NxDIP/LHeAhgHeapWSHfS3PesBTYaCynGR3aq8d356y 9smH+osc2fIgXVQM8y9SXdtVa9xqmQQLPydXJ4yk= From: "rdapp at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114027] [14] RISC-V vector: miscompile at -O3 Date: Thu, 22 Feb 2024 08:57:21 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rdapp 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: cc cf_reconfirmed_on cf_gcctarget 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=3D114027 Robin Dapp changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org Last reconfirmed| |2024-2-22 Target|riscv |x86_64-*-* riscv*-*-* | |aarch64-*-* --- Comment #5 from Robin Dapp --- To me it looks like we interpret e.g. c_53 =3D _43 ? prephitmp_13 : 0 as th= e only reduction statement and simplify to MAX because of the wrong assumption that this is the only reduction statement in the chain when we actually have several.=20 (See "condition expression based on compile time constant"). --- Comment #6 from Robin Dapp --- Btw this fails on x86 and aarch64 for me with -fno-vect-cost-model. So it definitely looks generic.=