WLS fails on simple codes, e.g., ktr.sac
|
|
Bugzilla Link |
646 |
Created on |
Dec 30, 2009 22:14 |
Resolution |
FIXED |
Resolved on |
Jan 03, 2010 21:46 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
crud.sac |
Extended Description
Build #16697 fails to perform WLS on this code (and many others):
int main()
{
A = with {
(. <= iv=[i] <= .) {
B = with {
(. <= jv=[j] <= .) {
VAL = _add_SxS_( i, _mul_SxS_( 2, j));
} : VAL;
} : genarray([4], 42);
} : B;
} : genarray([4], [10,20,30,40]);
StdIO::print(A);
return(0);
}
sac2c -d#,WLS gives this:
with {
(_flat_2 <= iv=[i] < _flat_5 genwidth [ _wlsimp_115 ])
{
B = with {
(_flat_2 <= jv=[j] < _flat_5 genwidth [ _wlsimp_116 ])
{
_flat_12 = _mul_SxS_( _flat_13, j);
VAL = _add_SxS_( i, _flat_12);
} : VAL ;
} :
genarray( _flat_5, _flat_7);
} : B ;
} :
genarray( _flat_5, _flat_1)
-----------------------------------------------
WLSCdoCheck: WLS: A: Checking whether with-loop can be scalarized.
WLSCwith: WLS: A: Outer with-loop has no full partition
WLSCdoCheck: WLS: A: With-loop cannot be scalarized.
I'm looking into it now, to see if there's a simple fix.