[llvm] [AMDGPU][TTI] Add target hook for the custom instruction uniformity (PR #137639)
Pankaj Dwivedi via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 2 06:09:08 PST 2025
================
@@ -147,6 +147,17 @@ bool llvm::GenericUniformityAnalysisImpl<MachineSSAContext>::isDivergentUse(
return isTemporalDivergent(*UseInstr->getParent(), *DefInstr);
}
+template <>
+bool GenericUniformityAnalysisImpl<MachineSSAContext>::isOperandUniform(
+ const MachineInstr &I, InstructionUniformity IU) const {
+ switch (IU) {
+ case InstructionUniformity::EitherOfFirstTwoOp:
+ return !isDivergentUse(I.getOperand(0)) || !isDivergentUse(I.getOperand(1));
----------------
PankajDwivedi-25 wrote:
Yeah, right, I think Op_1 and Op_2 should be checked here.
https://github.com/llvm/llvm-project/pull/137639
More information about the llvm-commits
mailing list