Skip to content

Commit 0bf2bf4

Browse files
committed
rebase
1 parent 07786cd commit 0bf2bf4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/Transforms/HandshakeOptimizeBitwidths.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)