[llvm] [AMDGPU][Uniformity][TTI] Make Uniformity Analysis Operand-Aware with Custom Target Hook (PR #137639)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 16 07:40:58 PST 2025
================
@@ -785,6 +797,14 @@ void GenericUniformityAnalysisImpl<ContextT>::markDivergent(
const InstructionT &I) {
if (isAlwaysUniform(I))
return;
+ // Check if instruction requires custom uniformity analysis
+ auto It = UniformInstruction.find(&I);
+ if (It != UniformInstruction.end()) {
+ if (It->second == InstructionUniformity::Custom && isCustomUniform(I)) {
+ addUniformOverride(I);
----------------
jayfoad wrote:
> I think to fix this, I should make this decision once divergence propagation is completed, or any other suggestion?
No, it must be done _during_ the divergence propagation, so that the divergence of the result can be propagated to other instructions.
https://github.com/llvm/llvm-project/pull/137639
More information about the llvm-commits
mailing list