https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126076

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> ---
This is an artifact of GORI working on within the current block.
THe first expression, if (t & t1) uses values from within the same block, so it
does a lot of work with those values.

=========== BB 2 ============
Imports: x_10(D)
Exports: _1  _2  x_10(D)  _21
         _1 : x_10(D)(I)
         _2 : x_10(D)(I)
         _3 : x_10(D)(I)
         _21 : _1  _2  x_10(D)(I)
x_10(D) [frange] double VARYING +-NAN
    <bb 2> :
    _1 = x_10(D) >= 5.0e-1;
    _2 = x_10(D) <= 1.3000000000000000444089209850062616169452667236328125e+0;
    _3 = x_10(D) < 1.75e+0;
    _21 = _1 & _2;


The second expression if (t & t2) use value from outside the block, meaning it
restricts what GORI can calculate:

=========== BB 7 ============
Imports: _1  _3
Exports: _1  _3  _22
         _22 : _1(I)  _3(I)
_1      [irange] bool VARYING
_3      [irange] bool VARYING
x_10(D) [frange] double VARYING +-NAN
    <bb 7> :
    _22 = _1 & _3;
    if (_22 != 0)
      goto <bb 8>; [INV]
    else
      goto <bb 12>; [INV]

GORIs functionality is block agnostic, but we restrict it to within the same
block to prevent crazy calculations cross blocks that may lose intervening
conditions and restrictions.

Im checking to see if that restriction still means anything now that the engine
is mature, or whether we could consider relaxing it sometimes (ie, allowing one
other block).

Regardless, removing the restriction fixes this test case.

Reply via email to