Skip to content

gdb.rocm/step-schedlock-spurious-waves: fix failure at -O3 - #296

Open
lumachad wants to merge 1 commit into
amd-stagingfrom
users/lumachad/amd-staging/cleanup_O3
Open

gdb.rocm/step-schedlock-spurious-waves: fix failure at -O3#296
lumachad wants to merge 1 commit into
amd-stagingfrom
users/lumachad/amd-staging/cleanup_O3

Conversation

@lumachad

Copy link
Copy Markdown
Collaborator

At -O3 the compiler collapses kern's loop body to fewer source line
mappings, causing the stepped wave to reach end_of_kernel in only 2
next commands instead of 5. The test's next loop then fails to match
its expected pattern when the end_of_kernel breakpoint fires.

Apply attribute ((optnone)) to kern, mirroring the same attribute
already used on end_of_kernel, to keep the loop intact under higher
optimization levels and ensure there are enough source lines to step
over.

At -O3 the compiler collapses kern's loop body to fewer source line
mappings, causing the stepped wave to reach end_of_kernel in only 2
next commands instead of 5.  The test's next loop then fails to match
its expected pattern when the end_of_kernel breakpoint fires.

Apply __attribute__ ((optnone)) to kern, mirroring the same attribute
already used on end_of_kernel, to keep the loop intact under higher
optimization levels and ensure there are enough source lines to step
over.
@lumachad
lumachad marked this pull request as ready for review August 20, 2026 11:39
@lumachad
lumachad requested a review from a team as a code owner August 20, 2026 11:39
@lumachad

Copy link
Copy Markdown
Collaborator Author

I've spotted this failing more recently. We should fix this to keep optimization test runs clean.

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.

2 participants