Commit e712871
authored
[MLIR][NVVM] Fix assertion failure for insufficient parsing validation of nvvm dialect PureSpecialRangeableRegisterOp (#163434)
The nvvm dialect instruction PureSpecialRangeableRegisterOp will trigger
an assertion failure in LLVM's constant range class when the lower and
upper range bounds are equal, but not equal to the integer minimum or
max (as required by constant ranges). This requirement is at [line 56 of
ConstantRange.cpp](https://llvm.org/doxygen/ConstantRange_8cpp_source.html#l00056):
`assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue()))
&& "Lower == Upper, but they aren't min or max value!");`
However, you can write an NVVM dialect operation such as:
`%0 = nvvm.read.ptx.sreg.warpsize range <i32, 32, 32> : i32`
which triggers this assertion. This change adds a fix to ensure that
this requirement is also enforced by NVVM.1 parent 24a4ad8 commit e712871
File tree
4 files changed
+46
-0
lines changed- mlir
- include/mlir/Dialect/LLVMIR
- lib/Dialect/LLVMIR/IR
- test/Target/LLVMIR
4 files changed
+46
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2334 | 2334 | | |
2335 | 2335 | | |
2336 | 2336 | | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
2337 | 2363 | | |
2338 | 2364 | | |
2339 | 2365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
0 commit comments