[llvm] [AMDGPU] Remove unnecessary predicates from aliases. NFC. (PR #91602)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 08:05:47 PDT 2024


jayfoad wrote:

> I think that since Requires is the last defined class in def _gfx12 ..., only the predicates in Requires will apply to the whole instruction definition.

Oh, good point. I had not noticed that the instruction and alias used the same def. I am tempted to split the alias into its own anonymous def.

> So is it Ok to remove HasExportInsts from this instruction? It might be if isGFX12Plus implies HasExportInsts

I suspect that nothing ever looks at the predicates on a Real instruction. Even the predicates on a Pseudo instruction don't seem to have much effect.

> Is this PR related to #89288 ?

Yes.

> I think in practice the export pseudo needs HasExportInsts for selection,

Possibly, but I suspect only the predicates on the pattern matter for this, not the predicates on the selected instruction.

> the Export Real needs isGFX12Plus for lowering to MCInst,

Maybe. I don't know about that.

> and the MnemonicAlias needs isGFX12Plus for having the alias on the right targets

Yes.

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


More information about the llvm-commits mailing list