The current implementations of ceilDiv and floorDiv involve multiplying
the operands. This results in an overflow when the operands are large, whereas
one might assume that dividing numbers should not result in overflow unless the
divisor is -1.
Details
Details
- Reviewers
bondhugula ezhulenev
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Support/MathExtras.h | ||
---|---|---|
27 | You can double-check if parentheses around the disjunction are needed. Perhaps better with extra parentheses around? PS: '||' does precede the ternary operator but they are pretty close! |
mlir/include/mlir/Support/MathExtras.h | ||
---|---|---|
27 | Dropping the parentheses around the disjunction will produce warnings. I added extra parenthesis around the whole condition. |
You can double-check if parentheses around the disjunction are needed. Perhaps better with extra parentheses around?
PS: '||' does precede the ternary operator but they are pretty close!