This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Divergence-driven abs instruction selection
ClosedPublic

Authored by alex-t on Feb 11 2022, 1:06 PM.

Details

Summary

This change enables "abs" SDNodes selection by the node divergence.

Diff Detail

Event Timeline

alex-t created this revision.Feb 11 2022, 1:06 PM
alex-t requested review of this revision.Feb 11 2022, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 1:06 PM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec added inline comments.Feb 11 2022, 2:22 PM
llvm/lib/Target/AMDGPU/SIInstructions.td
2255

Don't you need to add complexity to this pattern?

llvm/test/CodeGen/AMDGPU/divergence-driven-abs.ll
2

Fix file mode.

2

Add a run line for gfx900 to check opcode w/o carry.

16

Check v_sub as well, differently for SI and GFX9.

alex-t updated this revision to Diff 408403.Feb 14 2022, 6:56 AM

Test corrected. Added complexity for the AddNoCarry case.

alex-t marked 3 inline comments as done.Feb 14 2022, 6:57 AM
This revision is now accepted and ready to land.Feb 14 2022, 10:28 AM
This revision was landed with ongoing or failed builds.Feb 14 2022, 10:33 AM
This revision was automatically updated to reflect the committed changes.