Skip to content

feat: Add ifelse test for armv8m#247

Open
dop-amin wants to merge 2 commits into
mainfrom
fix_ifelse_parsing
Open

feat: Add ifelse test for armv8m#247
dop-amin wants to merge 2 commits into
mainfrom
fix_ifelse_parsing

Conversation

@dop-amin
Copy link
Copy Markdown
Collaborator

Adds a test to cover #236. No fix needed @mkannwischer?

Output of the test:

.equ RCxy_44, 14
.macro shift x, y
.if (RCxy_\x\()\y % 2) == 0
    vshr.u32 SHR_l, A_l, #32-(RCxy_\x\()\y/2)
.else
    vshr.u32 SHR_h, A_l, #32-((RCxy_\x\()\y-1)/2)
.endif
.endm

        start:
                                           // Instructions:    1
                                           // Expected cycles: 1
                                           // Expected IPC:    1.00
                                           //
                                           // Wall time:     0.02s
                                           // User time:     0.02s
                                           //
                                           // ----- cycle (expected) ------>
                                           // 0                        25
                                           // |------------------------|----
        vshr.u32 q4, q1, #32-(14/2)        // *.............................

                                                // ------ cycle (expected) ------>
                                                // 0                        25
                                                // |------------------------|-----
        // vshr.u32 SHR_l, A_l, #32-(14/2)      // *..............................

        end:

@dop-amin
Copy link
Copy Markdown
Collaborator Author

dop-amin commented Jun 24, 2025

  • Make test fail if other branch would be chosen, i.e., put something not parsable into the "impossible" branch.

@dop-amin dop-amin marked this pull request as ready for review June 24, 2025 13:43
@dop-amin dop-amin marked this pull request as draft June 24, 2025 14:46
@dop-amin dop-amin force-pushed the fix_ifelse_parsing branch from 493d393 to 9d216ab Compare April 13, 2026 13:40
@dop-amin dop-amin force-pushed the fix_ifelse_parsing branch from 9d216ab to 37232ea Compare April 13, 2026 15:19
@dop-amin dop-amin marked this pull request as ready for review April 13, 2026 16:10
@dop-amin dop-amin requested a review from mkannwischer April 13, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant