Loop-invariant removal doesn't
|
|
Bugzilla Link |
559 |
Created on |
Sep 04, 2009 22:17 |
Resolution |
FIXED |
Resolved on |
Oct 17, 2009 13:19 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Attachments |
crud.sac, crud.breaks.sac, crud3.sac
|
Extended Description
Created an attachment (id=568)
source code to reproduce fault in compress.
Build #16382:
If I compile the attached with:
sac2c -nowlf -doswlf -extrema crud.sac -b11:ebt >crud
I get the following:
_uprf_866 = _add_SxS_( i_0, -1);
_ivexi_717__flatg_511 = [ _uprf_866 ];
_pinl_106_res = with {
(_flatg_512 <= _pinl_103_iv=[_pinl_107__eat_9] < _flatg_509 genwidth [ i_0 ])
{
_ivexi_718 = _attachextrema_( _pinl_103_iv, _flatg_512, _ivexi_717__flatg_511);
_uprf_861 = _add_SxS_( _uprf_866, 1);
_swlfi_810__ivexi_717__flatg_511 = [ _uprf_861 ];
_ivexp_837 = _min_VxV_( _swlfi_810__ivexi_717__flatg_511, _flatg_509);
_swlfi_816 = _attachextrema_( _ivexp_837, _ivexp_837, _ivexp_837);
_swlfi_817__ivexi_718 = _attachintersect_( _ivexi_718, _swlfi_810__ivexi_717__flatg_511, _uprf_864, _swlfi_816);
_dup_728__pinl_104__flat_1031 = _sel_VxA_( _swlfi_817__ivexi_718, thisz);
} : _dup_728__pinl_104__flat_1031 ;
} :
genarray( [ i_0 ], _pinl_102__flat_1025);
Note that _uprf_861 has not been lifted out of the WL. Also,
as/dl/al should reduce it to:
_uprf_861 = i_0;
and that's not happening, either. This latter may be due to the fact
that the invariant removal has to happen first?