This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add LLVM IR Intrinsic for v_lerp_u8
ClosedPublic

Authored by wdng on Jul 11 2016, 1:35 PM.

Details

Summary

AMDGPU: Add LLVM IR Intrinsic implementation and a LIT test for v_lerp_u8

Diff Detail

Repository
rL LLVM

Event Timeline

wdng updated this revision to Diff 63563.Jul 11 2016, 1:35 PM
wdng retitled this revision from to AMDGPU: Add LLVM IR Intrinsic for v_lerp_u8.
wdng updated this object.
wdng added reviewers: arsenm, tstellarAMD, cfang.
wdng set the repository for this revision to rL LLVM.
wdng added a project: Restricted Project.
arsenm added inline comments.Jul 11 2016, 1:40 PM
test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll
1

You should also add an SI run line, this also doesn't need to specify hsa and -march=amdgcn is enough

5

you don't specify this check prefix so it should still be CHECK-LABEL

wdng updated this revision to Diff 63567.Jul 11 2016, 1:49 PM
wdng marked 2 inline comments as done.

Changes based on Matt's comments.

arsenm added inline comments.Jul 11 2016, 2:23 PM
lib/Target/AMDGPU/SIInstructions.td
2359–2366

This pattern is redundant with the one for the instruction definition and should be removed

test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll
2

Remove -mcpu=SI

wdng updated this revision to Diff 63579.Jul 11 2016, 2:43 PM

Removed redundant codes.

wdng updated this revision to Diff 63580.Jul 11 2016, 2:45 PM

Updated code again due to git cache is not updated properly.

arsenm added inline comments.Jul 11 2016, 2:51 PM
test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll
7

There still is no FUNC check prefix. You don't need separate SI and VI lines because they are identitcal

wdng updated this revision to Diff 63589.Jul 11 2016, 3:00 PM

Removed redundant func check lines.

arsenm added inline comments.Jul 11 2016, 3:09 PM
test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll
2–3

You should use either the default check prefix or GCN

wdng updated this revision to Diff 63598.Jul 11 2016, 3:22 PM
wdng marked 3 inline comments as done.

Use default CHECK for LIT tests.

arsenm added inline comments.Jul 11 2016, 3:49 PM
test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll
7

This is still using FUNC

wdng updated this revision to Diff 63604.Jul 11 2016, 3:58 PM

Use GCN LABEL.

arsenm accepted this revision.Jul 11 2016, 4:28 PM
arsenm edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 11 2016, 4:28 PM
This revision was automatically updated to reflect the committed changes.
wdng marked an inline comment as done.