From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 185AF3858D39; Wed, 1 Feb 2023 10:16:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 185AF3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675246566; bh=Wl+G+JZ9MUR36STQPEl0HBmUh3UOJ5SYyhbN9qFdrIk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NYSB3NxhBgiGKDWi8ensXDhAQ2jOVGZ0i2a6Nd+vtUuTJnWeOse67K8KXip8BSBf7 9C4YVaRfsL+TgkabRK2VH5OaEcO6YuGbMwC5rGUiYpY91uTOLh3Fi3//7kYZBAxkDF IrngjcYN7OC0gz1oL3qVgAfiB2ckoA/xR9TMsDLc= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108623] We need to grow the precision field in tree_type_common for PowerPC Date: Wed, 01 Feb 2023 10:16:04 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo 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: 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=3D108623 --- Comment #3 from rsandifo at gcc dot gnu.org --- The explanation is in the SET_TYPE_VECTOR_SUBPARTS code: /* We have two coefficients that are each in the range 1 << [0, 63], so supporting all combinations would require 6 bits per coefficient and 12 bits in total. Since the precision field is only 10 bits in size, we need to be more restrictive than that. At present, coeff[1] is always either 0 (meaning that the number of units is constant) or equal to coeff[0] (meaning that the number of units is N + X * N for some target-dependent zero-based runtime parameter X). We can therefore encode coeff[1] in a single bit. The most compact encoding would be to use mask 0x3f for coeff[0] and 0x40 for coeff[1], leaving 0x380 unused. It's possible to get slightly more efficient code on some hosts if we instead treat the shift amount as an independent byte, so here we use 0xff for coeff[0] and 0x100 for coeff[1]. */ If we're happy to extend to 16 bits then things become simpler. We can just use one byte per coefficient.=