[llvm] RFC: [AMDGPU] Check subtarget features for consistency (PR #86957)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 09:39:49 PDT 2024


arsenm wrote:

> > > TODO: `CodeGen/AMDGPU/unknown-processor.ll` fails because it doesn't set any subtarget features. I don't know how this should be handled. Do we really need to support `-mcpu=unknown`???
> > 
> > 
> > We need to support the none case for library builds, but I've been debating rejecting codegenning it. It's a nonstop source of bug reports where the default of "almost Tahiti" fails to select flat pointer load/store
> 
> Any suggestions what to do about this for now, so that I can land this patch without breaking it?

I've been leaning towards disallowing codegen for the none target. We get a steady stream of bug reports from people trying to apply it to random IR, but this is probably a more disruptive and time consuming change. 

Also, I've been leaning towards moving the wavesize out of the subtarget features. It's really more of an ABI trait that would be better off as either a family of calling conventions, or a separate function attribute .

For the purpose of this change, it's probably OK to ignore it. In practice the default target is just wave64

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


More information about the llvm-commits mailing list