Commit 688f0269 by Alan Mishchenko

Bug fix in blasting shifters with large bit-width.

parent a3095693
...@@ -143,7 +143,7 @@ void Wlc_BlastShiftRightInt( Gia_Man_t * pNew, int * pNum, int nNum, int * pShif ...@@ -143,7 +143,7 @@ void Wlc_BlastShiftRightInt( Gia_Man_t * pNew, int * pNum, int nNum, int * pShif
void Wlc_BlastShiftRight( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift, int nShift, int fSticky, Vec_Int_t * vRes ) void Wlc_BlastShiftRight( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift, int nShift, int fSticky, Vec_Int_t * vRes )
{ {
int nShiftMax = Abc_Base2Log(nNum); int nShiftMax = Abc_Base2Log(nNum);
if ( nShiftMax < nShift ) if ( nShiftMax < nShift && nShift > 30 )
{ {
int i, iRes = pShift[nShiftMax]; int i, iRes = pShift[nShiftMax];
for ( i = nShiftMax + 1; i < nShift; i++ ) for ( i = nShiftMax + 1; i < nShift; i++ )
...@@ -176,7 +176,7 @@ void Wlc_BlastShiftLeftInt( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift ...@@ -176,7 +176,7 @@ void Wlc_BlastShiftLeftInt( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift
void Wlc_BlastShiftLeft( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift, int nShift, int fSticky, Vec_Int_t * vRes ) void Wlc_BlastShiftLeft( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift, int nShift, int fSticky, Vec_Int_t * vRes )
{ {
int nShiftMax = Abc_Base2Log(nNum); int nShiftMax = Abc_Base2Log(nNum);
if ( nShiftMax < nShift ) if ( nShiftMax < nShift && nShift > 30 )
{ {
int i, iRes = pShift[nShiftMax]; int i, iRes = pShift[nShiftMax];
for ( i = nShiftMax + 1; i < nShift; i++ ) for ( i = nShiftMax + 1; i < nShift; i++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment