C++: Add basic Aarch64 Neon IR test#19715
Merged
jketema merged 2 commits intogithub:mainfrom Jun 10, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a simple ARM64 NEON test to verify that the extractor produces sensible IR for basic vector operations.
- Implements three NEON-based functions (
vadd_u8,vaddl_u8,arm_add) inarm.cpp - Updates
raw_ir.expected,aliased_ir.expected, andPrintAST.expectedto include the IR and AST outputs for the new functions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cpp/ql/test/library-tests/ir/ir/arm.cpp | New test file defining basic AArch64 NEON functions |
| cpp/ql/test/library-tests/ir/ir/raw_ir.expected | Added expected raw IR for the new NEON functions |
| cpp/ql/test/library-tests/ir/ir/aliased_ir.expected | Added expected aliased IR for the new NEON functions |
| cpp/ql/test/library-tests/ir/ir/PrintAST.expected | Added expected AST dump for the new NEON functions |
Comments suppressed due to low confidence (4)
cpp/ql/test/library-tests/ir/ir/arm.cpp:1
- [nitpick] Add a brief file-level comment explaining that this file defines basic ARM64 NEON functions used for IR extraction tests.
// semmle-extractor-options: --edg --target --edg linux_arm64
cpp/ql/test/library-tests/ir/ir/arm.cpp:3
- Avoid defining identifiers with double leading underscores, which are reserved by the language. Consider using a non-reserved name.
typedef __Uint8x8_t uint8x8_t;
cpp/ql/test/library-tests/ir/ir/arm.cpp:6
- [nitpick] Unify function signature formatting by removing the space before the parenthesis to match the style used elsewhere (e.g.,
vaddl_u8andarm_add).
uint8x8_t vadd_u8 (uint8x8_t __a, uint8x8_t __b)
cpp/ql/test/library-tests/ir/ir/arm.cpp:21
- [nitpick] Indentation is inconsistent: this block is indented with 4 spaces while other functions use 2. Consider standardizing the indentation style.
uint8x8_t c = vadd_u8(a, b);
IdrissRio
approved these changes
Jun 10, 2025
Contributor
IdrissRio
left a comment
There was a problem hiding this comment.
Both the IR and AST generated look good to me.
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.
This is just to check that the produced IR looks sensible, which it does.