This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Lower integer absolute value idiom to abs instruction.
ClosedPublic

Authored by jlebar on Jan 13 2017, 7:19 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 84424.Jan 13 2017, 7:19 PM
jlebar retitled this revision from to [NVPTX] Lower integer absolute value idiom to abs instruction..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added a subscriber: llvm-commits.
tra accepted this revision.Jan 17 2017, 1:47 PM
tra added inline comments.
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
490 ↗(On Diff #84424)

Perhaps add a link describing this way of calculating abs().
http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs

This revision is now accepted and ready to land.Jan 17 2017, 1:47 PM
This revision was automatically updated to reflect the committed changes.
jlebar marked an inline comment as done.