This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Add codegen support for S_INDIRECT_REG_WRITE_MOVREL_B32_V[9|10|11|12]
ClosedPublic

Authored by matejam on Mar 29 2023, 6:53 AM.

Diff Detail

Event Timeline

matejam created this revision.Mar 29 2023, 6:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 6:53 AM
matejam requested review of this revision.Mar 29 2023, 6:53 AM
foad added inline comments.Mar 30 2023, 7:50 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir
178

How would these tests fail without your patch?

matejam added inline comments.Mar 30 2023, 7:56 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir
178

The compiler wouldn't select S_INDIRECT_REG_WRITE_MOVREL_B32_V9, but would select S_INDIRECT_REG_WRITE_MOVREL_B32_V16 instead.

foad added inline comments.Mar 30 2023, 7:58 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir
178

Then maybe precommit the tests (no review required) and rebase?

matejam added inline comments.Mar 30 2023, 8:32 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir
178

The reason of the MIR test failure is because of the machine verifier, without it the test passes.
"Expected a SReg_512 register, but got a SGPR_288/SGPR_320/SGPR_352/SGPR_388 register."

foad accepted this revision.Mar 30 2023, 8:37 AM
foad added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir
178

Ack.

This revision is now accepted and ready to land.Mar 30 2023, 8:37 AM
arsenm added inline comments.Mar 31 2023, 2:28 PM
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir
312

are the vector cases tested for the same sizes?

matejam closed this revision.Jun 16 2023, 2:06 AM
foad added a comment.Jun 16 2023, 2:19 AM

Committed in 48f6964bcbfba25e79c301b0175be327cff586d9

Mateja if you use arc diff to create the patch it will automatically add a Differential Revision: line to your commit message, and then the review will be closed automatically when you push the commit.