From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F5E83858D39; Tue, 14 Mar 2023 13:46:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F5E83858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678801592; bh=Yi7oAlIuI02IHPQ+hXHVTuSGqxIaGJEbEp8dLrqWujA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xYD3FX3ViqB4lo2PcCv4kM0kmgFsYsh7Xg6qpqG9mPCbS9Uewx/azvb/n9sUwECLl qliMlj5OeCOXlsSuMTZFrevFtbKezOCMhX11p3hZ3ixoZhNlKA0Q56/tmxNi/sn6ry h+/9DV+lzeMPJinOISqBHq8/ZqjYv27iNdoNp7kY= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109109] [13 Regression] mariadb fails in tests on i586 (non-LTO mode) after r13-4435-g2c089640279614e3 Date: Tue, 14 Mar 2023 13:46:31 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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=3D109109 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gn= u.org Status|NEW |ASSIGNED --- Comment #16 from Jakub Jelinek --- More complete testcase: unsigned int arr[64]; __attribute__((noipa, regparm (2))) unsigned long long f1 (unsigned int ax, unsigned int dx) { return (((unsigned long long) arr[ax]) << 32) | ax; } __attribute__((noipa, regparm (2))) unsigned long long f2 (unsigned int ax, unsigned int dx) { return (((unsigned long long) arr[dx]) << 32) | ax; } __attribute__((noipa, regparm (2))) unsigned long long f3 (unsigned int ax, unsigned int dx) { return (((unsigned long long) ((unsigned int *) (((char *) arr) + ax))[dx= ]) << 32) | ax; } __attribute__((noipa, regparm (2))) unsigned long long f4 (unsigned int ax, unsigned int dx) { return (((unsigned long long) arr[ax]) << 32) | dx; } __attribute__((noipa, regparm (2))) unsigned long long f5 (unsigned int ax, unsigned int dx) { return (((unsigned long long) arr[dx]) << 32) | dx; } __attribute__((noipa, regparm (2))) unsigned long long f6 (unsigned int ax, unsigned int dx) { return (((unsigned long long) ((unsigned int *) (((char *) arr) + ax))[dx= ]) << 32) | dx; } __attribute__((noipa, regparm (3))) unsigned long long f7 (unsigned int ax, unsigned int dx, unsigned int cx) { return (((unsigned long long) arr[ax]) << 32) | cx; } __attribute__((noipa, regparm (3))) unsigned long long f8 (unsigned int ax, unsigned int dx, unsigned int cx) { return (((unsigned long long) arr[dx]) << 32) | cx; } __attribute__((noipa, regparm (3))) unsigned long long f9 (unsigned int ax, unsigned int dx, unsigned int cx) { return (((unsigned long long) ((unsigned int *) (((char *) arr) + ax))[dx= ]) << 32) | cx; } __attribute__((noipa, regparm (2))) unsigned long long f10 (unsigned int ax, unsigned int dx) { return (((unsigned long long) ax) << 32) | arr[ax]; } __attribute__((noipa, regparm (2))) unsigned long long f11 (unsigned int ax, unsigned int dx) { return (((unsigned long long) ax) << 32) | arr[dx]; } __attribute__((noipa, regparm (2))) unsigned long long f12 (unsigned int ax, unsigned int dx) { return (((unsigned long long) ax) << 32) | ((unsigned int *) (((char *) a= rr) + ax))[dx]; } __attribute__((noipa, regparm (2))) unsigned long long f13 (unsigned int ax, unsigned int dx) { return (((unsigned long long) dx) << 32) | arr[ax]; } __attribute__((noipa, regparm (2))) unsigned long long f14 (unsigned int ax, unsigned int dx) { return (((unsigned long long) dx) << 32) | arr[dx]; } __attribute__((noipa, regparm (2))) unsigned long long f15 (unsigned int ax, unsigned int dx) { return (((unsigned long long) dx) << 32) | ((unsigned int *) (((char *) a= rr) + ax))[dx]; } __attribute__((noipa, regparm (3))) unsigned long long f16 (unsigned int ax, unsigned int dx, unsigned int cx) { return (((unsigned long long) cx) << 32) | arr[ax]; } __attribute__((noipa, regparm (3))) unsigned long long f17 (unsigned int ax, unsigned int dx, unsigned int cx) { return (((unsigned long long) cx) << 32) | arr[dx]; } __attribute__((noipa, regparm (3))) unsigned long long f18 (unsigned int ax, unsigned int dx, unsigned int cx) { return (((unsigned long long) cx) << 32) | ((unsigned int *) (((char *) a= rr) + ax))[dx]; } int main () { for (int i =3D 0; i < 64; i++) arr[i] =3D 64 + i; #define CHECK_EQ(x, y) do { if (x !=3D y) __builtin_printf ("%s %llx !=3D %= llx\n", #x, x, y); } while (0) CHECK_EQ (f1 (8, 9), 0x4800000008ULL); CHECK_EQ (f2 (8, 9), 0x4900000008ULL); CHECK_EQ (f3 (8, 9), 0x4b00000008ULL); CHECK_EQ (f4 (8, 9), 0x4800000009ULL); CHECK_EQ (f5 (8, 9), 0x4900000009ULL); CHECK_EQ (f6 (8, 9), 0x4b00000009ULL); CHECK_EQ (f7 (8, 9, 10), 0x480000000aULL); CHECK_EQ (f8 (8, 9, 10), 0x490000000aULL); CHECK_EQ (f9 (8, 9, 10), 0x4b0000000aULL); CHECK_EQ (f10 (8, 9), 0x800000048ULL); CHECK_EQ (f11 (8, 9), 0x800000049ULL); CHECK_EQ (f12 (8, 9), 0x80000004bULL); CHECK_EQ (f13 (8, 9), 0x900000048ULL); CHECK_EQ (f14 (8, 9), 0x900000049ULL); CHECK_EQ (f15 (8, 9), 0x90000004bULL); CHECK_EQ (f16 (8, 9, 10), 0xa00000048ULL); CHECK_EQ (f17 (8, 9, 10), 0xa00000049ULL); CHECK_EQ (f18 (8, 9, 10), 0xa0000004bULL); } This fails: f4 (8, 9) 4800000048 !=3D 4800000009 f6 (8, 9) 4b0000004b !=3D 4b00000009=