[Microbenchmarks] Benchmark for vXi8 shift add/sub optimization#316
Open
grodranlorth wants to merge 1 commit intollvm:mainfrom
Open
[Microbenchmarks] Benchmark for vXi8 shift add/sub optimization#316grodranlorth wants to merge 1 commit intollvm:mainfrom
grodranlorth wants to merge 1 commit intollvm:mainfrom
Conversation
RKSimon
pushed a commit
to llvm/llvm-project
that referenced
this pull request
Mar 11, 2026
Fixes #164200 ~~I will create a separate PR to the `llvm-test-suite` repo for the microbenchmark for this change.~~ The benchmark is in llvm/llvm-test-suite#316 In my experiments on an EC2 `c6i.4xl`, the change gives a small improvement for the `x86-64`, `x86-64-v2`, and `x86-64-v3` targets. It regresses performance on `x86-64-v4` (in particular, when the constant decomposes into two shifts). The performance summary follows: ``` $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v1.json results-opt-generic-v1.json |tail -n1 OVERALL_GEOMEAN -0.2846 -0.2846 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v2.json results-opt-generic-v2.json |tail -n1 OVERALL_GEOMEAN -0.0907 -0.0907 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v3.json results-opt-generic-v3.json |tail -n1 OVERALL_GEOMEAN -0.1821 -0.1821 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v4.json results-opt-generic-v4.json |tail -n1 OVERALL_GEOMEAN +0.0190 +0.0190 0 0 0 0 ```
llvm-sync bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Mar 11, 2026
Fixes #164200 ~~I will create a separate PR to the `llvm-test-suite` repo for the microbenchmark for this change.~~ The benchmark is in llvm/llvm-test-suite#316 In my experiments on an EC2 `c6i.4xl`, the change gives a small improvement for the `x86-64`, `x86-64-v2`, and `x86-64-v3` targets. It regresses performance on `x86-64-v4` (in particular, when the constant decomposes into two shifts). The performance summary follows: ``` $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v1.json results-opt-generic-v1.json |tail -n1 OVERALL_GEOMEAN -0.2846 -0.2846 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v2.json results-opt-generic-v2.json |tail -n1 OVERALL_GEOMEAN -0.0907 -0.0907 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v3.json results-opt-generic-v3.json |tail -n1 OVERALL_GEOMEAN -0.1821 -0.1821 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v4.json results-opt-generic-v4.json |tail -n1 OVERALL_GEOMEAN +0.0190 +0.0190 0 0 0 0 ```
shermpay
pushed a commit
to shermpay/llvm-project
that referenced
this pull request
Mar 12, 2026
Fixes llvm#164200 ~~I will create a separate PR to the `llvm-test-suite` repo for the microbenchmark for this change.~~ The benchmark is in llvm/llvm-test-suite#316 In my experiments on an EC2 `c6i.4xl`, the change gives a small improvement for the `x86-64`, `x86-64-v2`, and `x86-64-v3` targets. It regresses performance on `x86-64-v4` (in particular, when the constant decomposes into two shifts). The performance summary follows: ``` $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v1.json results-opt-generic-v1.json |tail -n1 OVERALL_GEOMEAN -0.2846 -0.2846 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v2.json results-opt-generic-v2.json |tail -n1 OVERALL_GEOMEAN -0.0907 -0.0907 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v3.json results-opt-generic-v3.json |tail -n1 OVERALL_GEOMEAN -0.1821 -0.1821 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v4.json results-opt-generic-v4.json |tail -n1 OVERALL_GEOMEAN +0.0190 +0.0190 0 0 0 0 ```
albertbolt1
pushed a commit
to albertbolt1/llvm-project
that referenced
this pull request
Mar 13, 2026
Fixes llvm#164200 ~~I will create a separate PR to the `llvm-test-suite` repo for the microbenchmark for this change.~~ The benchmark is in llvm/llvm-test-suite#316 In my experiments on an EC2 `c6i.4xl`, the change gives a small improvement for the `x86-64`, `x86-64-v2`, and `x86-64-v3` targets. It regresses performance on `x86-64-v4` (in particular, when the constant decomposes into two shifts). The performance summary follows: ``` $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v1.json results-opt-generic-v1.json |tail -n1 OVERALL_GEOMEAN -0.2846 -0.2846 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v2.json results-opt-generic-v2.json |tail -n1 OVERALL_GEOMEAN -0.0907 -0.0907 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v3.json results-opt-generic-v3.json |tail -n1 OVERALL_GEOMEAN -0.1821 -0.1821 0 0 0 0 $ ../MicroBenchmarks/libs/benchmark/tools/compare.py benchmarks results-baseline-generic-v4.json results-opt-generic-v4.json |tail -n1 OVERALL_GEOMEAN +0.0190 +0.0190 0 0 0 0 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A benchmark for evaluating the optimization in llvm/llvm-project#164200