[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:33:35 PDT 2025


PankajDwivedi-25 wrote:

> I really think we need a more flexible target hook that can implement any arbitrary logic for the uniformity of the result of an operation, based on the uniformity of each of its operands.

The only way I see to achieve this is by passing the Uniformity of the operands to Targets and letting them define the custom rule.

My concern is that it would be a bit expensive, also the decision of uniformity will be taken outside of UA. 

Let me know if you guys have any thoughts on how best this can be implemented?

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


More information about the llvm-commits mailing list