[llvm] [AMDGPU] Detect trivially uniform arguments in InstCombine (PR #129897)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 5 08:38:27 PST 2025
================
@@ -440,6 +440,8 @@ static bool isTriviallyUniform(const Use &U) {
Value *V = U.get();
if (isa<Constant>(V))
return true;
+ if (const auto *A = dyn_cast<Argument>(V))
+ return AMDGPU::isArgPassedInSGPR(A);
----------------
arsenm wrote:
There's in progress work to switch divergent i1 arguments to use SGPRs, this could use refinement (or at least an assertion it's not i1 until that gets sorted out). Can you make sure there are tests with both i1 inreg, i1 without inreg, and some vector of i1?
https://github.com/llvm/llvm-project/pull/129897
More information about the llvm-commits
mailing list