[llvm] [VectorCombine][AMDGPU] Shrink demanded vector loads (PR #202501)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 02:05:47 PDT 2026


================
@@ -1792,6 +1792,74 @@ GCNTTIImpl::fpenvIEEEMode(const Instruction &I) const {
                                                : KnownIEEEMode::On;
 }
 
+bool GCNTTIImpl::shouldReduceLoadWidth(LoadInst *Load,
+                                       ArrayRef<Type *> NewLoadTys,
+                                       ArrayRef<uint64_t> NewLoadOffsets,
+                                       TTI::TargetCostKind CostKind) const {
+  if (!Load || !Load->isSimple() || NewLoadTys.empty() ||
+      NewLoadTys.size() != NewLoadOffsets.size() ||
----------------
arsenm wrote:

This should not be validating API usage. All of these argument checks should be unreachable 

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


More information about the llvm-commits mailing list