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:
98615fd
)
Apply clang-tidy fixes for readability-simplify-boolean-expr in SPIRVToLLVM.cpp ...
author
Mehdi Amini
<joker.eph@gmail.com>
Mon, 29 Aug 2022 10:25:52 +0000
(10:25 +0000)
committer
Mehdi Amini
<joker.eph@gmail.com>
Thu, 1 Sep 2022 00:37:14 +0000
(
00:37
+0000)
mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
b/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
index
0a0e7b0
..
1d6ae56
100644
(file)
--- a/
mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+++ b/
mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
@@
-252,7
+252,7
@@
static Optional<Type> convertArrayType(spirv::ArrayType type,
unsigned stride = type.getArrayStride();
Type elementType = type.getElementType();
auto sizeInBytes = elementType.cast<spirv::SPIRVType>().getSizeInBytes();
- if (stride != 0 &&
!(sizeInBytes && *sizeInBytes =
= stride))
+ if (stride != 0 &&
(!sizeInBytes || *sizeInBytes !
= stride))
return llvm::None;
auto llvmElementType = converter.convertType(elementType);