Commit b47ab92
committed
device-libs: Move special case check in rsqrt f64 implementation
Move the edge case check to be on the original input argument,
instead of the output of the rsq. This simplifies optimizations
to strip out the check based on value tracking. This approximately
results in equivalently good code. On targets with v_fmac_f64,
the result looks worse in the most trivial example due to a
bad decision to not rewrite to v_fma_f64 on the final
fma (llvm#171891). The result
is equivalently good in other final use contexts.1 parent 0648d87 commit b47ab92
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
35 | | - | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
0 commit comments