Commit 405403c
authored
[mlir] Fix GCC compilation warning in TuneExtensionOps.cpp (#168850)
Building with GCC produces:
```
<...>/TuneExtensionOps.cpp:180:26: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
180 | if (*selectedRegionIdx < 0 || *selectedRegionIdx >= getNumRegions())
| ~~~~~~~~~~~~~~~~~~~^~~
<...>/TuneExtensionOps.cpp: In member function ‘llvm::LogicalResult mlir::transform::tune::AlternativesOp::verify()’:
/home/david.spickett/llvm-project/mlir/lib/Dialect/Transform/TuneExtension/TuneExtensionOps.cpp:236:19: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
236 | if (regionIdx < 0 || regionIdx >= getNumRegions())
| ~~~~~~~~~~^~~
```
As we are sign extending these variables, use int64_t instead of size_t
for their type.1 parent f9e0fa8 commit 405403c
File tree
1 file changed
+2
-2
lines changed- mlir/lib/Dialect/Transform/TuneExtension
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
0 commit comments