[PATCH] D144162: [AMDGPU] Replace LegacyDA with Uniformity Analysis in AnnotateUniformValues
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 01:11:35 PST 2023
ruiling added a comment.
I think for this specific case, we should report %8 as uniform, and the branch should also be uniform. But there seems something wrong in the uniform analysis, if you try `opt -passes='print<uniformity>'` with the test here. We will see both the condition %8 and the conditional branch `br i1 %8,...` are reported as divergent. but the isUniform() query return true for the branch instruction. I think there should be something wrong in uniform analysis. If the condition is divergent, I think the branch should also be divergent. Another issue I want to point out that the uniform analysis has a subtle difference with divergence analysis. There is some comment in https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp#L13 to explain the issue. I think we need to fill the gap to switch to uniform analysis, otherwise we will regress code generation. The last time we discussed this, I think we want some target specific option in uniform analysis to match this behavior with divergence analysis.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144162/new/
https://reviews.llvm.org/D144162
More information about the llvm-commits
mailing list