Commit 01e0309
committed
[ConstantFolding] Fix nvvm_round folding on PPC
Fix a failing test for constant-folding the nvvm_round intrinsic.
The original implementation added in llvm#141233 used a native libm
call to the "round" function, but on PPC this produces +0.0 if the
input is -0.0, which caused a test failure.
This patch updates it to use APFloat functions instead of native
libm calls to ensure cross-platform consistency.1 parent e801a10 commit 01e0309
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2677 | 2677 | | |
2678 | 2678 | | |
2679 | 2679 | | |
2680 | | - | |
2681 | | - | |
2682 | | - | |
2683 | | - | |
2684 | | - | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
2685 | 2688 | | |
2686 | 2689 | | |
2687 | 2690 | | |
| |||
0 commit comments