This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU : Add LLVM intrinsics for SAD related instructions.
ClosedPublic

Authored by wdng on Aug 3 2016, 12:56 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

wdng updated this revision to Diff 66695.Aug 3 2016, 12:56 PM
wdng retitled this revision from to AMDGPU : Add intrinsics for SAD related instructions..
wdng updated this object.
wdng added reviewers: tstellarAMD, arsenm.
wdng set the repository for this revision to rL LLVM.
wdng updated this revision to Diff 66699.Aug 3 2016, 12:58 PM

Add two more LIT tests.

wdng retitled this revision from AMDGPU : Add intrinsics for SAD related instructions. to AMDGPU : Add LLVM intrinsics for SAD related instructions..Aug 3 2016, 12:59 PM

LGTM, but I think you should also add tests where none of the arguments are immediates.

include/llvm/IR/IntrinsicsAMDGPU.td
440

Typo: mqsad.u32

wdng updated this revision to Diff 67364.Aug 9 2016, 9:59 AM
wdng edited edge metadata.
  1. Add using non-immediate LIT tests.
  2. Fixed a typo.
arsenm added inline comments.Aug 9 2016, 10:28 AM
include/llvm/IR/IntrinsicsAMDGPU.td
410

All of these comments with the names should be removed

test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.u32.u8.ll
8

functions should also use attribute group for nounwind

wdng updated this revision to Diff 67383.Aug 9 2016, 11:51 AM
  1. Remove comments
  2. Add attribute group for function.
This revision was automatically updated to reflect the committed changes.
arsenm added inline comments.Aug 11 2016, 10:03 AM
llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.sad.hi.u8.ll
17 ↗(On Diff #67696)

Attribute not needed on intrinsic call sites

22–23 ↗(On Diff #67696)

These are broken

llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.sad.u16.ll
22–23 ↗(On Diff #67696)

Also broken

llvm/trunk/test/CodeGen/AMDGPU/llvm.amdgcn.sad.u8.ll
22–23 ↗(On Diff #67696)

Also broken