Commit 1261c5a
committed
[IndVarSimplify] Ensure fp values can be represented as consecutive integers
When transforming floating-point induction variables into integer ones,
make sure we stay within the bounds of fp values that can be represented
as integers without gaps, i.e., 2^24 and 2^53 for IEEE-754 single and
double precision respectively (both on negative and positive side).
Fixes: #166496.1 parent 8a2ef91 commit 1261c5a
File tree
2 files changed
+36
-10
lines changed- llvm
- lib/Transforms/Scalar
- test/Transforms/IndVarSimplify
2 files changed
+36
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
| |||
265 | 280 | | |
266 | 281 | | |
267 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
268 | 295 | | |
269 | 296 | | |
270 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | | - | |
| 426 | + | |
428 | 427 | | |
429 | | - | |
430 | | - | |
| 428 | + | |
| 429 | + | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
| |||
451 | 450 | | |
452 | 451 | | |
453 | 452 | | |
454 | | - | |
| 453 | + | |
455 | 454 | | |
456 | | - | |
457 | | - | |
| 455 | + | |
| 456 | + | |
458 | 457 | | |
459 | 458 | | |
460 | 459 | | |
| |||
478 | 477 | | |
479 | 478 | | |
480 | 479 | | |
481 | | - | |
| 480 | + | |
482 | 481 | | |
483 | | - | |
484 | | - | |
| 482 | + | |
| 483 | + | |
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
| |||
0 commit comments