From 5b0863f3ef9ed967794a6a135e60ea72ef6304cf Mon Sep 17 00:00:00 2001 From: Rob Suderman Date: Wed, 31 Aug 2022 16:02:29 -0700 Subject: [PATCH] [mlir][tosa] Bitwidth mismatch should be long-long not long Reviewed By: scotttodd Differential Revision: https://reviews.llvm.org/D133064 --- mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)