[mlir][tosa] Bitwidth mismatch should be long-long not long

Reviewed By: scotttodd

Differential Revision: https://reviews.llvm.org/D133064
This commit is contained in:
Rob Suderman 2022-08-31 16:02:29 -07:00
parent 76f097cf14
commit 5b0863f3ef
1 changed files with 2 additions and 2 deletions

View File

@ -610,7 +610,7 @@ OpFoldResult MulOp::fold(ArrayRef<Attribute> 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<Attribute> operands) {
if (rhsAttr && rhsAttr.isSplat() && resultETy.isa<IntegerType>()) {
auto val = rhsAttr.getSplatValue<APInt>();
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)