Commit cc96240
authored
Remove sqrt from the volatile list (#43786)
The LLVM IR spec now explicitly says that this intrinsic is required
to be rounded correctly. That means that without fasthmath flag
(which we do not set here), this intrinsic must have the bitwise
correctly rounded answer and should thus not differ between compile
and runtime. If there is still a case where it does differ, that is
likely some other underlying bug that we should fix instead.
Before:
```
julia> f() = sqrt(2)
f (generic function with 1 method)
julia> @code_typed f()
CodeInfo(
1 ─ %1 = Base.Math.sqrt_llvm(2.0)::Float64
└── return %1
) => Float64
```
After:
```
julia> @code_typed f()
CodeInfo(
1 ─ return 1.4142135623730951
) => Float64
```1 parent 23b4743 commit cc96240
3 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
622 | 621 | | |
623 | 622 | | |
624 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1386 | 1386 | | |
1387 | 1387 | | |
1388 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
1389 | 1391 | | |
1390 | 1392 | | |
1391 | | - | |
| 1393 | + | |
1392 | 1394 | | |
1393 | 1395 | | |
0 commit comments