This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Implement select() for @llvm.amdgcn.cvt.pkrtz
ClosedPublic

Authored by tstellar on Apr 20 2018, 4:00 PM.

Diff Detail

Event Timeline

tstellar created this revision.Apr 20 2018, 4:00 PM

Have you tried enabling the tablegen selector build? I’ve been avoiding commiting any of these kind of simple selectors without that

Have you tried enabling the tablegen selector build? I’ve been avoiding commiting any of these kind of simple selectors without that

Yes, it only generates code for stand-alone patterns and instruction patterns that use specify register classes for operands rather than types.

Actually, I just discovered -warn-on-skipped-patterns on it looks like most patterns are skipped because the ComplexPatterns is not mapped to GlobalISel. It looks like the pkrtz pattern doesn't match because it uses a SDNode.

Have you tried enabling the tablegen selector build? I’ve been avoiding commiting any of these kind of simple selectors without that

lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
165

Separate line

516

Ditto

test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cvt.pkrtz.mir
5–9

I think you can drop the IR section, even with the intrinsic declaration

tstellar updated this revision to Diff 144278.Apr 26 2018, 9:37 PM
tstellar marked an inline comment as done.

Rewrite patch to use TableGen'd instruction selector.

test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cvt.pkrtz.mir
5–9

It complained about function cvt_pkrtz not being defined in the IR, but I was able to drop the intrinsic declaration.

tstellar updated this revision to Diff 146957.May 15 2018, 4:21 PM

Rebase to pull in updated TableGen pattern classes.

arsenm accepted this revision.Jun 14 2018, 12:02 AM

LGTM

This revision is now accepted and ready to land.Jun 14 2018, 12:02 AM
This revision was automatically updated to reflect the committed changes.