diff --git a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp index 04fb3ca79a6f..385e4068011f 100644 --- a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp +++ b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp @@ -610,7 +610,7 @@ OpFoldResult MulOp::fold(ArrayRef operands) { if (val.isZero()) return lhsAttr; const int64_t shift = getShift(); - const int64_t shifted = 1L << shift; + const int64_t shifted = 1LL << shift; if (val.getSExtValue() == shifted) return rhs; } @@ -618,7 +618,7 @@ OpFoldResult MulOp::fold(ArrayRef operands) { if (rhsAttr && rhsAttr.isSplat() && resultETy.isa()) { auto val = rhsAttr.getSplatValue(); const int64_t shift = getShift(); - const int64_t shifted = 1L << shift; + const int64_t shifted = 1LL << shift; if (val.isZero()) return rhsAttr; if (val.getSExtValue() == shifted)