[all-commits] [llvm/llvm-project] 9271a7: [AMDGPU] Mark `SI_WATERFALL_LOOP` as divergent in ...
Igor Wodiany via All-commits
all-commits at lists.llvm.org
Mon Sep 14 03:40:45 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9271a73e189508743b4b2ad4393f12d5a8132fa9
https://github.com/llvm/llvm-project/commit/9271a73e189508743b4b2ad4393f12d5a8132fa9
Author: Igor Wodiany <igor.wodiany at amd.com>
Date: 2026-09-14 (Mon, 14 Sep 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
M llvm/test/CodeGen/AMDGPU/machine-sink-temporal-divergence-swdev407790.mir
Log Message:
-----------
[AMDGPU] Mark `SI_WATERFALL_LOOP` as divergent in `hasDivergentBranch` (#218969)
When a vector instruction takes an SGPR source operand, sinking it out
of a loop with divergent exit would cause the vector instruction to only
get the value from the last iteration in the SGPR. However, in a
divergent loop the value of the SGPR operand may vary across iterations,
so the instruction cannot be sink out of the loop as only using the last
value is incorrect. Before this change `SI_LOOP` was marked as divergent
but `SI_WATERFALL_LOOP` was not, allowing such incorrect sinking for
waterfall loops.
Assisted-by: Claude Code
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list