LIR misses out on arrays
Bugzilla Link | 1189 |
Created on | Mar 07, 2017 20:20 |
Version | svn |
OS | Linux |
Architecture | PC |
Attachments | bug2.sac |
Extended Description
Created an attachment (id=1059) source code to reproduce failure In my local Build: sac2c -V sac2c 1.2-beta-BlackForest-400-g48da-dirty build-type: DEBUG built-by: "sac" at 2017-03-06T17:21:34 I observed the following, compiling with default options: bool[20] _MAIN::_dup_863_main__Loop_0( bool[20] _dup_3532_Zrow { ,NN } , int colx { ,NN } ) /* * _dup_863_main__Loop_0 :: --- */ { int _al_868 { , NN } ; int _pinl_547__flat_32 { , NN } ; bool _pinl_548__flat_67 { , NN } ; bool[20] Crow__SSA0_3 { , NN } ; bool[20] Crow__SSA0_2 { , NN } ; _pinl_547__flat_32 = _add_SxS_( 1, colx); _al_868 = _add_SxS_( -19, colx); _pinl_548__flat_67 = _lt_SxS_( _al_868, 0); if (_pinl_548__flat_67) { Crow__SSA0_2 = _MAIN::_dup_863_main__Loop_0( _dup_3532_Zrow, _pinl_547__flat_32) ; } else { } Crow__SSA0_3 = ( _pinl_548__flat_67 ? Crow__SSA0_2 : _dup_3532_Zrow ); return( Crow__SSA0_3); } Note that _dup_3532_Zrow is loop-invariant, yet it does not get lifted out of the loop. I am looking into this now.