POGO fails to optimize guard on select from shape() expression.
|
|
Bugzilla Link |
1200 |
Created on |
Aug 03, 2017 17:24 |
Resolution |
FIXED |
Resolved on |
Aug 07, 2017 23:16 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
SCSprf_val_le_val_VxV.sac |
Extended Description
Created an attachment (id=1065)
source code to reproduce failure
This unit test fails:
~/sac/testsuite/optimizations/pogo$ vi SCSprf_val_le_val_VxV.sac
sac@rattler:~/sac/testsuite/optimizations/pogo$ UnitTestRunGrep1 SCSprf_val_le_val_VxV.sac
...
Greptest: SCSprf_val_le_val_VxV.sac -check c -dopogo -noggs -dolacsi -dowlf -nopwlf -noawlf -noctz -norelcf -noainl -doplur failed with 3 hits on phrase "val_l". Wanted 2 hits
sac@rattler:~/sac/testsuite/optimizations/pogo$ vi grepd
sac@rattler:~/sac/testsuite/optimizations/pogo$ ^C
sac@rattler:~/sac/testsuite/optimizations/pogo$ sac2c -V
sac2c 1.2-beta-BlackForest-569-ge881c2
build-type: DEBUG
built-by: "sac" at 2017-07-21T17:03:33
The offending code is:
_flat_3 = 0;
v1 = _MAIN::id( _flat_2, _flat_7) ;
_isaa_3058_v1 = _shape_A_( v1);
_isaa_3059_v1 = _saabind_( _flat_4, _isaa_3058_v1, v1);
_uprf_2654 = _idx_sel_( _flat_3, _isaa_3058_v1);
_uprf_2643, _uprf_2644 = _val_le_val_SxS_( _flat_3, _uprf_2654);
The fault is likely in PHUT, which should be able to deduce that
_uprf_2654 is an element of a shape vector, and hence is non-negative.