Commit 40d2346
committed
[ConstantFolding] Fix incorrect nvvm_round folding
The nvvm_round intrinsic should round to the nearest even
number in the case of ties. It matches the semantics of rint
(not round as the name suggests).1 parent 03e54a1 commit 40d2346
File tree
2 files changed
+49
-3
lines changed- llvm
- lib/Analysis
- test/Transforms/InstSimplify
2 files changed
+49
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2679 | 2679 | | |
2680 | 2680 | | |
2681 | 2681 | | |
2682 | | - | |
2683 | | - | |
2684 | 2682 | | |
2685 | 2683 | | |
2686 | | - | |
| 2684 | + | |
2687 | 2685 | | |
2688 | 2686 | | |
2689 | 2687 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
419 | 467 | | |
420 | 468 | | |
421 | 469 | | |
| |||
0 commit comments