projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd417c6
)
Apply clang-tidy fixes for readability-simplify-boolean-expr in Shape.cpp (NFC)
author
Mehdi Amini
<joker.eph@gmail.com>
Sun, 12 Jun 2022 17:51:08 +0000
(17:51 +0000)
committer
Mehdi Amini
<joker.eph@gmail.com>
Tue, 28 Jun 2022 18:08:58 +0000
(18:08 +0000)
mlir/lib/Dialect/Shape/IR/Shape.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/Dialect/Shape/IR/Shape.cpp
b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index
b3f6c4c
..
b448291
100644
(file)
--- a/
mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/
mlir/lib/Dialect/Shape/IR/Shape.cpp
@@
-1717,7
+1717,7
@@
LogicalResult SplitAtOp::fold(ArrayRef<Attribute> operands,
// Verify that the split point is in the correct range.
// TODO: Constant fold to an "error".
int64_t rank = shape.size();
- if (
!(-rank <= splitPoint && splitPoint <= rank)
)
+ if (
-rank > splitPoint || splitPoint > rank
)
return failure();
if (splitPoint < 0)
splitPoint += shape.size();