This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix selecting llvm.amdgcn.s.getreg
ClosedPublic

Authored by arsenm on Jul 27 2020, 5:22 AM.

Details

Summary

This introduces the same bug llvm.amdgcn.s.setreg has where if the
user specified an immediate outside of the valid 16-bit range, it will
select into a verifier error.

Diff Detail

Event Timeline

arsenm created this revision.Jul 27 2020, 5:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2020, 5:22 AM
rampitec added inline comments.Jul 28 2020, 2:20 PM
llvm/lib/Target/AMDGPU/SOPInstructions.td
814

Why cannot you use as_i16imm?

arsenm added inline comments.Jul 28 2020, 2:23 PM
llvm/lib/Target/AMDGPU/SOPInstructions.td
814

Because it's a freestanding SDNodeXForm. This would require using a combination Operand+SDNodeXForm class. These should probably be merged, but that's a bigger patch

rampitec accepted this revision.Jul 28 2020, 2:28 PM
This revision is now accepted and ready to land.Jul 28 2020, 2:28 PM