File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1629,12 +1629,12 @@ struct ArithCmpFW : public OpRewritePattern<handshake::CmpIOp> {
16291629 // sign-extension of a negative number will insert a 1-bit upfront which
16301630 // changes the result.
16311631 // Example: cmpi uge zext(110), sext(10) must be done using 4, not 3 bits.
1632- if ((extLhs == ExtType::ZEXT && extRhs == ExtType::SEXT &&
1633- minLhs. getType (). getDataBitWidth () >=
1634- minRhs. getType () .getDataBitWidth ()) ||
1635- (extRhs == ExtType::ZEXT && extLhs == ExtType::SEXT &&
1636- minRhs. getType (). getDataBitWidth () >=
1637- minLhs. getType () .getDataBitWidth ()))
1632+ if ((lhsExtValue. getExtType () == ExtType::ZEXT &&
1633+ rhsExtValue. getExtType () == ExtType::SEXT &&
1634+ lhsExtValue. getDataBitWidth () >= rhsExtValue .getDataBitWidth ()) ||
1635+ (rhsExtValue. getExtType () == ExtType::ZEXT &&
1636+ lhsExtValue. getExtType () == ExtType::SEXT &&
1637+ rhsExtValue. getDataBitWidth () >= lhsExtValue .getDataBitWidth ()))
16381638 optWidth += 1 ;
16391639
16401640 if (optWidth >= actualWidth)
You can’t perform that action at this time.
0 commit comments