Commit 25bd04c
Clean up in rangecheck (#129144)
Minor cleanup in `rangecheck.cpp`:
- Range Check was trying to do what assertionprop already did - handle
constant indices. Removed with zero diffs.
- The previous code had a correctness issue - it called a slow SSA-based
`GetRangeWorker` for Array's length but didn't use `DoesOverflow` that
must be called for `GetRangeWorker`. Instead, I just call the VN-based
`GetRangeFromAssertions` (that plays nicely with overflows) and it seems
to be enough, a few minor regression, a minor TP improvement.
> [!NOTE]
> This PR was generated with the assistance of GitHub Copilot.
[Diffs](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1455184&view=ms.vss-build-web.run-extensions-tab)
(from an incorrect call to `GetRangeWorker` without `DoesOverflow`)
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8ac369d commit 25bd04c
3 files changed
Lines changed: 9 additions & 114 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | 1340 | | |
1390 | 1341 | | |
1391 | 1342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9075 | 9075 | | |
9076 | 9076 | | |
9077 | 9077 | | |
9078 | | - | |
9079 | 9078 | | |
9080 | 9079 | | |
9081 | 9080 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
279 | 278 | | |
280 | 279 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 280 | + | |
| 281 | + | |
284 | 282 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
| 283 | + | |
342 | 284 | | |
343 | 285 | | |
344 | 286 | | |
| |||
428 | 370 | | |
429 | 371 | | |
430 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
431 | 376 | | |
432 | 377 | | |
433 | 378 | | |
| |||
0 commit comments