[mlir][tosa] Fix windows build-bot error due to implicit i64 cast

There is an implicit i64 cast due to the << during MulOp's folder.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D132969
This commit is contained in:
Rob Suderman 2022-08-30 12:59:50 -07:00
parent 2be8af8f0e
commit c173c04b12
1 changed files with 3 additions and 1 deletions

View File

@ -609,7 +609,9 @@ OpFoldResult MulOp::fold(ArrayRef<Attribute> operands) {
auto val = lhsAttr.getSplatValue<APInt>();
if (val.isZero())
return lhsAttr;
if (val.getSExtValue() == (1 << getShift()))
const int64_t shift = getShift();
const int64_t shifted = 1 << shift;
if (val.getSExtValue() == shifted)
return rhs;
}