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:
68874d8
)
Apply clang-tidy fixes for llvm-else-after-return in CommonFolders.h (NFC)
author
Mehdi Amini
<joker.eph@gmail.com>
Tue, 11 Jan 2022 20:49:18 +0000
(20:49 +0000)
committer
Mehdi Amini
<joker.eph@gmail.com>
Thu, 13 Jan 2022 23:25:49 +0000
(23:25 +0000)
mlir/include/mlir/Dialect/CommonFolders.h
patch
|
blob
|
history
diff --git
a/mlir/include/mlir/Dialect/CommonFolders.h
b/mlir/include/mlir/Dialect/CommonFolders.h
index
a52b890
..
b3f600e
100644
(file)
--- a/
mlir/include/mlir/Dialect/CommonFolders.h
+++ b/
mlir/include/mlir/Dialect/CommonFolders.h
@@
-41,8
+41,9
@@
Attribute constFoldBinaryOp(ArrayRef<Attribute> operands,
return AttrElementT::get(lhs.getType(),
calculate(lhs.getValue(), rhs.getValue()));
- } else if (operands[0].isa<SplatElementsAttr>() &&
- operands[1].isa<SplatElementsAttr>()) {
+ }
+ if (operands[0].isa<SplatElementsAttr>() &&
+ operands[1].isa<SplatElementsAttr>()) {
// Both operands are splats so we can avoid expanding the values out and
// just fold based on the splat value.
auto lhs = operands[0].cast<SplatElementsAttr>();