A bug in vrp_meet?
Jeff Law
law@redhat.com
Tue Mar 5 21:17:00 GMT 2019
On 3/1/19 10:49 AM, Qing Zhao wrote:
> Jeff,
>
> thanks a lot for the reply.
>
> this is really helpful.
>
> I double checked the dumped intermediate file for pass âdom3", and
> located the following for _152:
>
> ****BEFORE the pass âdom3â, there is no _152, the corresponding Block
> looks like:
>
> Â <bb 4> [local count: 12992277]:
> Â Â _98 = (int) ufcMSR_52(D);
> Â Â k_105Â = (sword) ufcMSR_52(D);
> Â Â i_49 = _98 > 0 ? k_105 : 0;
>
> ***During the pass âdomsâ, Â _152 is generated as following:
>
> Optimizing block #4
> â¦.
> Visiting statement:
> i_49 = _98 > 0 ? k_105 : 0;
> Meeting
> Â Â [0, 65535]
> and
> Â Â [0, 0]
> to
> Â Â [0, 65535]
> Intersecting
> Â Â [0, 65535]
> and
> Â Â [0, 65535]
> to
> Â Â [0, 65535]
> Optimizing statement i_49 = _98 > 0 ? k_105 : 0;
> Â Â Replaced 'k_105' with variable '_98'
> gimple_simplified to _152 = MAX_EXPR <_98, 0>;
> i_49 = _152;
> Â Â Folded to: i_49 = _152;
> LKUP STMT i_49 = _152
> ==== ASGN i_49 = _152
>
> then bb 4 becomes:
>
> Â <bb 4> [local count: 12992277]:
> Â Â _98 = (int) ufcMSR_52(D);
> Â Â k_105 = _98;
> Â Â _152 = MAX_EXPR <_98, 0>;
> Â Â i_49 = _152;
>
> and all the i_49 are replaced with _152.Â
>
> However, the value range info for _152 doesnot reflect the one for i_49,
> it keeps as UNDEFINED.Â
>
> is this the root problem? Â
Yes, I think so. It's like we didn't record anything for _152 when we
simplified the RHS to a MAX_EXPR.
Jeff
More information about the Gcc
mailing list