Serguei Katkov | 339dfc2 | 2015-04-20 12:29:32 +0600 | [diff] [blame] | 1 | Regression check for optimizing simplify instruction pass. |
Serguei Katkov | 115b53f | 2015-08-05 17:03:30 +0600 | [diff] [blame] | 2 | |
Serguei Katkov | 339dfc2 | 2015-04-20 12:29:32 +0600 | [diff] [blame] | 3 | A pair (sub, neg) should not be transforemd to (sub) for |
| 4 | fp calculation because we can lose the sign of zero for |
| 5 | the following expression: |
| 6 | - ( A - B ) != B - A ; if B == A |
Serguei Katkov | 115b53f | 2015-08-05 17:03:30 +0600 | [diff] [blame] | 7 | |
| 8 | Addition or subtraction with fp zero should not be eliminated |
| 9 | because: |
| 10 | -0.0 + 0.0 = 0.0 |
| 11 | -0.0 - -0.0 = 0.0 |