[llvm] [AMDGPU][TTI] Add Target Hook for Instruction Uniformity (getInstructionUniformity) (PR #137639)

Pankaj Dwivedi via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 01:25:27 PDT 2025


================
@@ -48,6 +75,11 @@ void llvm::GenericUniformityAnalysisImpl<SSAContext>::pushUsers(
     const Value *V) {
   for (const auto *User : V->users()) {
     if (const auto *UserInstr = dyn_cast<const Instruction>(User)) {
+      if (SpecialUniformIntrinsics.count(UserInstr) &&
+          isAnyOperandUniform(*UserInstr)) {
----------------
PankajDwivedi-25 wrote:

Yeah, I think as @jayfoad suggested. Probably I should let this be decided by the target. The only thing is that it would be costlier, and the decision of uniformity will be taken outside of UA, which I am not sure is acceptable?

https://github.com/llvm/llvm-project/pull/137639


More information about the llvm-commits mailing list