This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix asserting on gather4 intrinsics
ClosedPublic

Authored by arsenm on Feb 10 2020, 6:09 AM.

Details

Reviewers
nhaehnle
kerbowa

Diff Detail

Event Timeline

arsenm created this revision.Feb 10 2020, 6:09 AM

LGTM, except for one thing mentioned in the comments (which other code may also be getting wrong still, but oh well...).

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll
499

Can you please change this test to make %bias a half as well?

We recently double-checked the docs, and the rule is: when A16 is set in the encoding, the %bias address still occupies a full 32-bit register, but only the lower 16 bits are meaningful, and they're interpreted as a half-float.

(The same is *not* true of the zcompare or offset address operands that the _c and _o variants have.)

nhaehnle accepted this revision.Feb 16 2020, 10:00 AM
This revision is now accepted and ready to land.Feb 16 2020, 10:00 AM
arsenm marked an inline comment as done.Mar 17 2020, 7:31 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll
499

So the second name mangling parameter should be removed?

arsenm marked an inline comment as done.Mar 17 2020, 7:57 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll
499

This hits an assert, so I think this should be put into a separate fix change