From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 73B663858D39; Fri, 2 Sep 2022 20:03:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73B663858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662149017; bh=bYgvt8Mo5Wk4iD754K4lv8yCX6vWyBaJriM/a+MWYI4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pfMnnXplbvO3eBMxTWIoF2vAhOtVtExrAmoBnjsjAd+TumeF0vsQUFf+gGKoW2Hje bHJPIvAAyW4lYAPuph/N/z4irbAN9sjeyhBaZ5FMu3LB1AFm7ZNBrCNTvkoHb+nZYi 0/Dj5XNjlqYImP5kERs/fAu6Z8Z9YvluuGM2aZ74= From: "palmer at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106818] code is genereated differently with or without 'extern' Date: Fri, 02 Sep 2022 20:03:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palmer 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 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=3D106818 palmer at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |palmer at gcc dot gnu.org --- Comment #4 from palmer at gcc dot gnu.org --- (In reply to Andrew Pinski from comment #2) > Most likely known alignment or not. > Riscv targets are sensitive to alignment. Not sure I'm allowed to paste the code in for them, but that's what's going= on here: with -mtune=3Dthead-c906 both cases have a single store, the default = is for Rocket which has very slow misaligned accesses. That said, I think we actually have a bug here: if the extern symbol was re= ally of unknown alignment then sharing the lui might not work.=