File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
mlir/lib/Dialect/Tosa/Transforms Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,12 @@ struct TosaFoldConstantMul : public OpRewritePattern<MulOp> {
75
75
isa<IntegerType>(resultElementType));
76
76
auto resultElementWidth = resultElementType.getIntOrFloatBitWidth ();
77
77
assert (resultElementWidth >= lhsElemType.getIntOrFloatBitWidth () &&
78
- " The multiplication is expected to have an at least a big output "
78
+ " The multiplication is expected to have an at least as big output "
79
79
" as input type" );
80
- // TODO: To implement shifts > 0, capture the shift value stored in the
81
- // mul here
82
- bool mulOverflowed;
80
+
81
+ // Compute the multiplication and track if an overflow occurred to enable
82
+ // emitting a warning
83
+ bool mulOverflowed = false ;
83
84
auto intMulFun = [&resultElementWidth, &mulOverflowed](
84
85
const APInt &first, const APInt &second) {
85
86
bool didOverflow;
You can’t perform that action at this time.
0 commit comments