From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8CAAC3858404; Fri, 1 Dec 2023 19:15:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CAAC3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701458147; bh=rYD2M1bPV+1Bh9DxMX5gr1UCi24z+7L6olgyfzh/KPA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lRzmywSP/stz0jEUQ2WhpgDM2GFEOoFRxGsKIYZJQcuqMBvpZwHFR+zLil6b/ZbDI MiTjX5I6aePYX61imr3flwX0DAWhk+CMokPF97aiRUR4+z+QfAN2YjtU1PyaqMlQKI yVQ+N0WMYXWQTir5TdQswvegKR5aJYmufeAgHU84= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112788] [14 regression] ICEs in fold_range, at range-op.cc:206 after r14-5972-gea19de921b01a6 Date: Fri, 01 Dec 2023 19:15:46 +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: 14.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D112788 --- Comment #2 from Andrew Macleod --- (In reply to Kewen Lin from comment #1) >=20 > ranger makes use of type precision directly instead of something like > types_compatible_p. I wonder if we can introduce a target hook (or hookpo= d) > to make ranger unrestrict this check a bit, the justification is that for > float type its precision information is encoded in its underlying > real_format, if two float types underlying modes are the same, the precis= ion > are actually the same.=20 >=20 > btw, the operand_check_ps seems able to call range_compatible_p? It could, but just a precision check seemed enough at the time. The patch also went thru many iterations and it was only the final version = that operand_check_p() ended up with types as the parameter rather than ranges. You bring up a good point tho. I just switched those routines to call range_compatible_p() and checked it in. Now it is all centralized in the o= ne routine going forward.=20 It does seem wrong that the float precision don't match, and weird that its hard to fix :-) It should now be possible to have range_compatible_p check the underlying mode for floats rather than the precision... If there's a g= ood argument for it, and you want to give that a shot...=