[llvm] [AMDGPU][DAG] Allow extract_subvector for free register copy (PR #214152)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 01:19:59 PDT 2026


================
@@ -233,6 +233,13 @@ class AMDGPUTargetLowering : public TargetLowering {
   bool shouldReduceLoadWidth(SDNode *Load, ISD::LoadExtType ExtType, EVT ExtVT,
                              std::optional<unsigned> ByteOffset) const override;
 
+  /// If extracting a subvector of type \p ResVT starting at element \p Index
+  /// out of a vector of type \p SrcVT is a plain sub register reference,
+  /// return the sub register index that describes it. Otherwise return
+  /// AMDGPU::NoSubRegister.
+  virtual unsigned getExtractSubvectorSubReg(EVT ResVT, EVT SrcVT,
----------------
arsenm wrote:

This doesn't need to be virtual (though I don't think you need this at all. 

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


More information about the llvm-commits mailing list