Page MenuHomePhabricator

AMDGPU: Add patterns for v4i16/v4f16 -> v4i16/v4f16 bitcasts
AcceptedPublic

Authored by pendingchaos on Thu, Nov 29, 8:50 AM.

Details

Reviewers
arsenm
tstellar

Diff Detail

Event Timeline

pendingchaos created this revision.Thu, Nov 29, 8:50 AM

This fixes a selection error I came across:

LLVM ERROR: Cannot select: t16: v4f16 = bitcast t15

t15: v4i16,ch = CopyFromReg t0, Register:v4i16 %3
  t14: v4i16 = Register %3

I'm not too familiar with LLVM, so I'm not 100% certain of the correctness or
completeness of this.

I don't have commit access.

Needs test case, but this is correct

Adds a test for the bug.

arsenm added inline comments.Sun, Dec 2, 9:28 AM
test/CodeGen/AMDGPU/bitcast-v4f16-v4i16.ll
5

probably should use amdgpu_ps to avoid the waterfall

10

Can you add the inverse too?

Update test.

arsenm accepted this revision.Sun, Dec 16, 9:39 PM

LGTM

This revision is now accepted and ready to land.Sun, Dec 16, 9:39 PM