From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 163D23858D38; Mon, 30 Jan 2023 22:09:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 163D23858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675116598; bh=CHkJxAIffE/PMdsnlsyLmOJ6KlC25W5dOqLzV8mQYI0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BAl2RUcbwWfQ/3pZvGS4+6P6lbtFziLowR0YvQ87NwxGbUnRDwRFeDMnxnFQ/f1FS 7DuuktLysBDByZUTiIk0XUEsOTZnJ8gZhzfBCRclHSFb6Rff5NauD4fW6YuDIzISdx rgXQeDq7VmMwoUTJEPk509OoyfYxhkG/0iOHO++g= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108608] [12/13 Regression] AArch64 vectorizer ICE in vect_transform_reduction and __builtin_fmax Date: Mon, 30 Jan 2023 22:09:57 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108608 --- Comment #5 from Jakub Jelinek --- The original code in kokkos had roughly: Real max_rel_err =3D -1; const Real rel_tol =3D std::numeric_limits::epsilon(); for (int n =3D 0; n < N; n++) { for (int k =3D 0; k < N; k++) { for (int j =3D 0; j < N; j++) { for (int i =3D 1; i < N - 1; i++) { const Real analytic =3D 2.0 * (i + 1) * pow((j + 2) * (k + 3) * (= n + 4), 2.0); const Real err =3D host_du(n, k, j, i - 1) - analytic; max_rel_err =3D fmax(fabs(err / analytic), max_rel_err); } } } } return max_rel_err < rel_tol; where Real is double, and host_du is some hard to decipher C++ object.=