This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71762] [5/6/7 Regression] ~X & Y to X < Y doesn't work for uninitialized values
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Nov 2016 16:19:34 +0000
- Subject: [Bug middle-end/71762] [5/6/7 Regression] ~X & Y to X < Y doesn't work for uninitialized values
- Auto-submitted: auto-generated
- References: <bug-71762-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71762
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
--- Comment #7 from Jeffrey A. Law <law at redhat dot com> ---
ISTM the transformation is valid on gimple, but that at RTL expansion time we
don't guarantee the range of the uninitialized object is [01]. And yes, if we
have to insert truncations this transformation becomes a lose.
One approach would be something similar to the unswitching on an uninitialized
value fix that I need to get back to -- ensure the values are initialized and
if they aren't, don't allow the transformation.
I wouldn't be surprised if there are other places where using type/vrp
information on a sub-word sized object that is uninitialized is going to cause
problems.
I don't think losing the transformations would be that big of a deal either.
My recollection is they definitely triggered in GCC itself, but I don't have a
sense of how often.