Commit 86dfbaf
committed
Fix NaN correctness for ordered float reflexive rules and merge_idx guard
- Disable FOrdEq(x,x), FOrdLe(x,x), FOrdGe(x,x) reflexive rules in
logical.egg: IEEE 754 says NaN is not ordered with itself, so these
return false for NaN inputs. Keep FOrdLt/FOrdGt reflexive rules
(strict inequality is always false, correct for NaN).
- Add merge_idx < header_idx safety guard in both selection and switch
construct RVSDG guards: non-standard block ordering could cause
empty/invalid ranges.
- Update test_boolconst_float_comparison_reflexive to verify FOrdEq(x,x)
is NOT folded (NaN correctness) and FOrdLt(x,x) IS folded.1 parent 96e17dd commit 86dfbaf
3 files changed
Lines changed: 50 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
640 | 644 | | |
641 | 645 | | |
642 | 646 | | |
| |||
754 | 758 | | |
755 | 759 | | |
756 | 760 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
761 | 769 | | |
762 | 770 | | |
763 | 771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6557 | 6557 | | |
6558 | 6558 | | |
6559 | 6559 | | |
6560 | | - | |
| 6560 | + | |
| 6561 | + | |
| 6562 | + | |
6561 | 6563 | | |
6562 | 6564 | | |
6563 | 6565 | | |
| |||
6566 | 6568 | | |
6567 | 6569 | | |
6568 | 6570 | | |
6569 | | - | |
| 6571 | + | |
| 6572 | + | |
| 6573 | + | |
6570 | 6574 | | |
6571 | 6575 | | |
6572 | 6576 | | |
6573 | 6577 | | |
6574 | 6578 | | |
6575 | 6579 | | |
6576 | 6580 | | |
6577 | | - | |
6578 | | - | |
| 6581 | + | |
| 6582 | + | |
| 6583 | + | |
| 6584 | + | |
| 6585 | + | |
| 6586 | + | |
| 6587 | + | |
| 6588 | + | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
| 6592 | + | |
| 6593 | + | |
6579 | 6594 | | |
6580 | 6595 | | |
6581 | 6596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
462 | 470 | | |
463 | 471 | | |
464 | 472 | | |
465 | 473 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
472 | 480 | | |
473 | 481 | | |
474 | 482 | | |
| |||
0 commit comments