Skip to content

Commit

Permalink
Fix minor issues (#9391)
Browse files Browse the repository at this point in the history
  • Loading branch information
richlander authored Jul 9, 2024
1 parent 6a12fd3 commit 7477893
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions release-notes/9.0/preview/preview6/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ for (int i = 100; i > 0; i--)
}
```

For the first example, we need to emit an instruction to increment `i`, followed by an instruction to perform the `i < 100` comparison, followed by a conditional jump to continue the loop if the conditoin is still true -- that's three instructions in total. However, if we flip the counter's direction, we need one fewer instruction. For example, on x64, we can use the `dec` instruction to decrement `i`; when `i` reaches zero, the `dec` instruction sets a CPU flag that can be used as the condition for a jump instruction immediately following the `dec`.
For the first example, we need to emit an instruction to increment `i`, followed by an instruction to perform the `i < 100` comparison, followed by a conditional jump to continue the loop if the condition is still true -- that's three instructions in total. However, if we flip the counter's direction, we need one fewer instruction. For example, on x64, we can use the `dec` instruction to decrement `i`; when `i` reaches zero, the `dec` instruction sets a CPU flag that can be used as the condition for a jump instruction immediately following the `dec`.

Here's what the x64 assembly looks like for the first example:
```asm
Expand Down Expand Up @@ -203,7 +203,7 @@ G_M59043_IG03: ;; offset=0x0010
; Total bytes of code: 21
```

Preview 6 improves RyuJIT's ability to track the usages of local variables' addresses, and avoid unnecessary address exposure. In this example, the more precise address exposure detection allows RyuJIT to replace usages of the `Awaitable` instance with its `Opts` field, and then eliminate `Opts` altogether by evaluating the constant expression `value ? 1 : 2`, where `value` is known to be `false`.
RyuJIT can now better track the usage of local variables' addresses, and avoid unnecessary address exposure. In this example, the more precise address exposure detection allows RyuJIT to replace usages of the `Awaitable` instance with its `Opts` field, and then eliminate `Opts` altogether by evaluating the constant expression `value ? 1 : 2`, where `value` is known to be `false`.

Here's what the updated x64 assembly looks like:
```asm
Expand All @@ -217,7 +217,7 @@ Check out [dotnet/runtime #102808](https://github.com/dotnet/runtime/pull/102808

## AVX10v1 Support

Preview 6 introduces support for AVX10, a new SIMD instruction set by Intel. Using the new API surface under `System.Runtime.Intrinsics.X86.Avx10v1`, you'll be able to accelerate your .NET applications on AVX10-enabled hardware through numerous vectorized operations. Check out [dotnet/runtime #101938](https://github.com/dotnet/runtime/pull/101938).
New APIs have been added for AVX10, a new SIMD instruction set by Intel. You'll be able to accelerate your .NET applications on AVX10-enabled hardware with vectorized operations using the new `System.Runtime.Intrinsics.X86.Avx10v1` APIs. Check out [dotnet/runtime #101938](https://github.com/dotnet/runtime/pull/101938).

## Hardware Intrinsic Code Generation

Expand Down

0 comments on commit 7477893

Please sign in to comment.