forked from OSchip/llvm-project
[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:
parent
2be8af8f0e
commit
c173c04b12
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue