[PATCH] D135609: [AMDGPU] Fix True16 patterns for cmp on GFX11

Joe Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 07:15:33 PDT 2022


Joe_Nash added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/v_cmp_gfx11.ll:16
+entry:
+  %0 = tail call i64 @llvm.amdgcn.icmp.i64.i16(i16 0, i16 0, i32 32)
+  %cmp0 = icmp eq i64 %0, 0
----------------
arsenm wrote:
> arsenm wrote:
> > Should also test llvm.amdgcn.fcmp. I'd assume that's missing coverage too if this was broken 
> Plus ballot 
Is ballot well defined for 16 bit destinations? I think ballot should work over the waveSize, so only 32 or 64 bit returns are valid.
For an instrinsic like this

```
declare i16 @llvm.amdgcn.ballot.i16(i1)
```
I would expect a problem here
AMDGPUInstructionSelector.cpp:1226 
AMDGPUInstructionSelector::selectBallot

```
  if (Size != STI.getWavefrontSize())
    return false;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135609/new/

https://reviews.llvm.org/D135609



More information about the llvm-commits mailing list