Skip to content

[WaveTransform] Skip lane-mask accumulator reset inside a uniform origin branch - #3854

Merged
cdevadas merged 2 commits into
amd-feature/wave-transformfrom
amd/dev/tmahatej/wave-transform/fix-reset-in-uniform-originblock
Aug 13, 2026
Merged

[WaveTransform] Skip lane-mask accumulator reset inside a uniform origin branch#3854
cdevadas merged 2 commits into
amd-feature/wave-transformfrom
amd/dev/tmahatej/wave-transform/fix-reset-in-uniform-originblock

Conversation

@TejaX-Alaghari

@TejaX-Alaghari TejaX-Alaghari commented Aug 11, 2026

Copy link
Copy Markdown

The unconditional accumulator reset inside an origin branch (in step 1.1) is only valid when the accumulator has just been consumed in full. That is, when EXEC has been set to it - which happens only at divergent origin branches (in step 2.2).

At a uniform origin branch nothing consumes the accumulator as EXEC is unrelated to it.
So, zeroing there would discard the contributions of lanes that are inactive in this block but still reach the lane target through another origin.

@rocm-cciapp

rocm-cciapp Bot commented Aug 11, 2026

Copy link
Copy Markdown

Comment thread llvm/test/CodeGen/AMDGPU/WaveTransform/wave-transform-uniform-divergent-join.ll Outdated
Comment thread llvm/test/CodeGen/AMDGPU/WaveTransform/wave-transform-uniform-divergent-join.ll Outdated

@cdevadas cdevadas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test comment need a change.

@TejaX-Alaghari

Copy link
Copy Markdown
Author

The test comment need a change.

Sorry, I missed it in a hurry. Updated the comments as suggested now.

@rocm-cciapp

rocm-cciapp Bot commented Aug 11, 2026

Copy link
Copy Markdown

@TejaX-Alaghari
TejaX-Alaghari force-pushed the amd/dev/tmahatej/wave-transform/fix-reset-in-uniform-originblock branch from 1a20290 to 3fd4ba3 Compare August 12, 2026 06:43
@rocm-cciapp

rocm-cciapp Bot commented Aug 12, 2026

Copy link
Copy Markdown

@cdevadas
cdevadas merged commit 0dbb410 into amd-feature/wave-transform Aug 13, 2026
3 checks passed
@cdevadas
cdevadas deleted the amd/dev/tmahatej/wave-transform/fix-reset-in-uniform-originblock branch August 13, 2026 14:20
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