-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[llvm-exegesis] [AArch64] Reland Resolving "not all operands are initialized by snippet generator" #156423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sjoerdmeijer
merged 31 commits into
llvm:main
from
lakshayk-nv:llvm-exegesis-uninit-operands-reland
Sep 3, 2025
Merged
[llvm-exegesis] [AArch64] Reland Resolving "not all operands are initialized by snippet generator" #156423
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
b1919dd
[llvm-exegesis] [AArch64] Resolve " Not all operands were initialized…
lakshayk-nv af68e0f
[llvm-exegesis] [AArch64] Include OPERAND_PCREL operand handling in s…
lakshayk-nv 5697760
[llvm-exegesis] [AArch64] WIP. Introduce handling for OPERAND_FIRST_T…
lakshayk-nv 75c2e65
[llvm-exegesis] [AArch64] Explore opcode-specific immediate values fo…
lakshayk-nv 9d425dc
[llvm-exegesis] [AArch64] Refactor operand handling in randomizeTarge…
lakshayk-nv 9a1feb2
[llvm-exegesis] [AArch64] Update comments for operand handling and re…
lakshayk-nv f567870
[llvm-exegesis] [AArch64] Format changes.
lakshayk-nv 66fdd39
[llvm-exegesis] [AArch64] Remove unneccessary AArch64 guard
lakshayk-nv 59452e5
[llvm-exegesis] [AArch64] Add handling for OPERAND_FIRST_TARGET in ra…
lakshayk-nv 1726bea
[llvm-exegesis] [AArch64] Documenting opcodes requiring some specific…
lakshayk-nv c26aa00
[llvm-exegesis] [AArch64] Add tests for operand omission scenarios in…
lakshayk-nv f43b8e2
[llvm-exegesis] [AArch64] Reporting limitation in initializing operan…
lakshayk-nv c26beda
[llvm-exegesis] [AArch64] Enhance randomizeTargetMCOperand to support…
lakshayk-nv ef67b17
[llvm-exegesis] [AArch64] Update test to reflect changes in immediate…
lakshayk-nv aea8861
[llvm-exegesis] [AArch64] Clang Format
lakshayk-nv 0f09343
[AArch64] Introduce new operand types for MSL shifts and update relat…
lakshayk-nv 5a56401
[AArch64] Update randomizeTargetMCOperand to handle MSL immediate ope…
lakshayk-nv cd435fb
[AArch64] Clang Format
lakshayk-nv 9ae23af
[llvm-exegesis] [AArch64] Updated tescase to check introduced OPERAND…
lakshayk-nv b0b4a5d
Merge branch 'main' into llvm-exegesis-uninit-operands
lakshayk-nv 555ddf7
[AArch64] Introduce single `OPERAND_MSL_SHIFT` for both 2s and 4s o…
lakshayk-nv aa60946
[AArch64] Update MSL shift handling toopcode specific switch case
lakshayk-nv 6b593fe
[AArch64] Cleanup unrequired changes
lakshayk-nv ab92f0f
[llvm-exegesis] [AArch64] Revert redundant PR_PAC_* constants
lakshayk-nv dbbed99
[llvm-exegesis] [AArch64] Simplifies shift value for all move_vec_shi…
lakshayk-nv bda8043
[AArch64] Shifted defination OPERAND_MSL_SHIFT for readability NFC
lakshayk-nv 2d7fc2f
clang format
lakshayk-nv 93ec649
[AArch64] Refactor move_vec_shift operand def and update operand type…
lakshayk-nv 9787b4d
[[lvm-exegesis] [AArch64] Updated PCREL imm value to 8 and Updated co…
lakshayk-nv ac07228
[llvm-exegesis] [AArch64] Correct UMOVvi16_idx0 latency testcase
lakshayk-nv a5c23a3
[llvm-exegesis] [AArch64] Fixed comment clarity on hacky fix by omitt…
lakshayk-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# REQUIRES: aarch64-registered-target | ||
|
||
|
||
|
||
// Test for omitting OperandType::OPERAND_SHIFT_MSL | ||
|
||
// MOVIv2s_msl: MOVI vd, #imm{, shift} | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=latency --benchmark-phase=prepare-and-assemble-snippet --opcode-name=MOVIv4s_msl 2>&1 | FileCheck %s --check-prefix=MOVIv4s_msl_latency | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=inverse_throughput --benchmark-phase=prepare-and-assemble-snippet --opcode-name=MOVIv4s_msl 2>&1 | FileCheck %s --check-prefix=MOVIv4s_msl_throughput | ||
# MOVIv4s_msl_latency-NOT: Not all operands were initialized by the snippet generator for MOVIv4s_msl opcode | ||
|
||
// TODO: Add test to check if the immediate value is correct when serial execution strategy is added for MOVIv4s_msl | ||
|
||
|
||
# MOVIv4s_msl_throughput-NOT: Not all operands were initialized by the snippet generator for MOVIv4s_msl opcode | ||
# MOVIv4s_msl_throughput: --- | ||
# MOVIv4s_msl_throughput-NEXT: mode: inverse_throughput | ||
# MOVIv4s_msl_throughput-NEXT: key: | ||
# MOVIv4s_msl_throughput-NEXT: instructions: | ||
# MOVIv4s_msl_throughput-NEXT: MOVIv4s_msl [[REG1:Q[0-9]+|LR]] i_0x1 i_0x108 | ||
# MOVIv4s_msl_throughput: ... | ||
|
||
// MOVIv2s_msl: MOVI vd, #imm{, shift} | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=latency --benchmark-phase=prepare-and-assemble-snippet --opcode-name=MOVIv2s_msl 2>&1 | FileCheck %s --check-prefix=MOVIv2s_msl_latency | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=inverse_throughput --benchmark-phase=prepare-and-assemble-snippet --opcode-name=MOVIv2s_msl 2>&1 | FileCheck %s --check-prefix=MOVIv2s_msl_throughput | ||
# MOVIv2s_msl_latency-NOT: Not all operands were initialized by the snippet generator for MOVIv2s_msl opcode | ||
|
||
// TODO: Add test to check if the immediate value is correct when serial execution strategy is added for MOVIv2s_msl | ||
|
||
|
||
# MOVIv2s_msl_throughput-NOT: Not all operands were initialized by the snippet generator for MOVIv2s_msl opcode | ||
# MOVIv2s_msl_throughput: --- | ||
# MOVIv2s_msl_throughput-NEXT: mode: inverse_throughput | ||
# MOVIv2s_msl_throughput-NEXT: key: | ||
# MOVIv2s_msl_throughput-NEXT: instructions: | ||
# MOVIv2s_msl_throughput-NEXT: MOVIv2s_msl [[REG1:D[0-9]+|LR]] i_0x1 i_0x108 | ||
# MOVIv2s_msl_throughput: ... | ||
|
||
|
||
|
||
// Test for omitting OperandType::OPERAND_PCREL | ||
// LDRDl: LDRD ldr1, ldr2, [pc, #imm] | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=latency --benchmark-phase=prepare-and-assemble-snippet --opcode-name=LDRDl 2>&1 | FileCheck %s --check-prefix=LDRDl_latency | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=inverse_throughput --benchmark-phase=prepare-and-assemble-snippet --opcode-name=LDRDl 2>&1 | FileCheck %s --check-prefix=LDRDl_throughput | ||
|
||
# LDRDl_latency-NOT: Not all operands were initialized by the snippet generator for LDRDl opcodes | ||
# LDRDl_throughput-NOT: Not all operands were initialized by the snippet generator for LDRDl opcodes | ||
|
||
# LDRDl_throughput: --- | ||
# LDRDl_throughput-NEXT: mode: inverse_throughput | ||
# LDRDl_throughput-NEXT: key: | ||
# LDRDl_throughput-NEXT: instructions: | ||
# LDRDl_throughput-NEXT: LDRDl [[REG1:D[0-9]+|LR]] i_0x8 | ||
# LDRDl_throughput: ... | ||
|
||
|
||
|
||
// Test for omitting OperandType::OPERAND_IMPLICIT_IMM_0 | ||
|
||
// UMOVvi16_idx0: UMOV wd, vn.h[index] | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=latency --benchmark-phase=prepare-and-assemble-snippet --opcode-name=UMOVvi16_idx0 2>&1 | FileCheck %s --check-prefix=UMOVvi16_idx0_latency | ||
# RUN: llvm-exegesis --mtriple=aarch64 --mcpu=neoverse-v2 --mode=inverse_throughput --benchmark-phase=prepare-and-assemble-snippet --opcode-name=UMOVvi16_idx0 2>&1 | FileCheck %s --check-prefix=UMOVvi16_idx0_throughput | ||
|
||
# UMOVvi16_idx0_latency-NOT: UMOVvi16_idx0: Not all operands were initialized by the snippet generator for UMOVvi16_idx0 opcode. | ||
|
||
# UMOVvi16_idx0_throughput-NOT: UMOVvi16_idx0: Not all operands were initialized by the snippet generator for UMOVvi16_idx0 opcode. | ||
# UMOVvi16_idx0_throughput: --- | ||
# UMOVvi16_idx0_throughput-NEXT: mode: inverse_throughput | ||
# UMOVvi16_idx0_throughput-NEXT: key: | ||
# UMOVvi16_idx0_throughput-NEXT: instructions: | ||
# UMOVvi16_idx0_throughput-NEXT: UMOVvi16_idx0 [[REG1:W[0-9]+|LR]] [[REG2:Q[0-9]+|LR]] i_0x0 | ||
# UMOVvi16_idx0_throughput: ... |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also count for 272 ? We may not want to enforce 264 always?
Edit: This can be extended for other imm operands which are defaulted to some value, probably in a separate patch- essentially "taking value as an arg" . @boomanaiden154 @sjoerdmeijer @davemgreen what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, this area needs some work in follow ups, but let's start somewhere with this, so is okay as a start.