This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix VRP handling of undefined state


On Fri, Jul 29, 2011 at 1:46 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> I noticed that for binary expressions VRP contains the same bugs
> that CCP once did (it treats UNDEFINED * 0 as UNDEFINED). ?Then
> I noticed we never hit this bug because we never end up with
> any range being UNDEFINED - which is bad, because this way we miss
> value-ranges for all conditionally initialized variables.
>
> Thus, the following patch fixes this and conservatively handles
> the binary expression case (which is only of academic interest
> anyway - the important part is to handle UNDEFINED in PHIs).
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
>
> Richard.
>
> 2011-07-29 ?Richard Guenther ?<rguenther@suse.de>
>
> ? ? ? ?* tree-vrp.c (get_value_range): Only set parameter default
> ? ? ? ?definitions to varying, leave others at undefined.
> ? ? ? ?(extract_range_from_binary_expr): Fix undefined handling.
> ? ? ? ?(vrp_visit_phi_node): Handle merged undefined state.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53465


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]