Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Match the logic in mini_emit_sext_index_reg and OP_BOUNDS_CHECK decom…
…position (#108469) Match the logic in mini_emit_sext_index_reg and OP_BOUNDS_CHECK decomposition. This was already done for LLVM but not for any other target. Instead there was an assert which was hit early on startup when the optimization was enabled (tested on ARM64). The optimization is not enabled by default but that's separate issue. There are potentially some performance wins to have. For example, the `Burgers` benchmarks in dotnet/performance shows this: Default: ``` | Method | Mean | Error | StdDev | Median | Min | Max | Gen0 | Gen1 | Gen2 | Allocated | |---------- |-----------:|--------:|--------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-------------:| | Burgers_3 | 487.9 ms | 2.33 ms | 2.06 ms | 488.2 ms | 483.5 ms | 490.7 ms | - | - | - | 156.76 KB | | Burgers_0 | 1,266.8 ms | 3.19 ms | 2.83 ms | 1,265.5 ms | 1,264.5 ms | 1,273.6 ms | 47000.0000 | 47000.0000 | 47000.0000 | 781750.05 KB | | Burgers_1 | 1,180.1 ms | 2.98 ms | 2.49 ms | 1,180.4 ms | 1,176.5 ms | 1,185.3 ms | - | - | - | 156.74 KB | | Burgers_2 | 286.9 ms | 0.17 ms | 0.15 ms | 286.9 ms | 286.6 ms | 287.0 ms | - | - | - | 156.74 KB | ``` With -O=abcrem: ``` | Method | Mean | Error | StdDev | Median | Min | Max | Gen0 | Gen1 | Gen2 | Allocated | |---------- |-----------:|--------:|--------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-------------:| | Burgers_3 | 395.5 ms | 1.25 ms | 1.11 ms | 395.6 ms | 394.0 ms | 397.8 ms | - | - | - | 156.76 KB | | Burgers_0 | 1,167.8 ms | 5.45 ms | 4.83 ms | 1,167.5 ms | 1,161.5 ms | 1,176.8 ms | 47000.0000 | 47000.0000 | 47000.0000 | 781750.05 KB | | Burgers_1 | 1,104.2 ms | 2.82 ms | 2.64 ms | 1,102.9 ms | 1,100.4 ms | 1,108.5 ms | - | - | - | 156.74 KB | | Burgers_2 | 192.2 ms | 0.36 ms | 0.30 ms | 192.2 ms | 191.8 ms | 192.8 ms | - | - | - | 156.74 KB | ```
- Loading branch information