This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Implement llvm.fabs.f32, llvm.max.f32, etc.
ClosedPublic

Authored by jlebar on Sep 7 2016, 10:06 AM.

Details

Summary

Previously these only worked via NVPTX-specific intrinsics.

This change will allow us to convert these target-specific intrinsics
into the general LLVM versions, allowing existing LLVM passes to reason
about their behavior.

It also gets us some minor codegen improvements as-is, from situations
where we canonicalize code into one of these llvm intrinsics.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 70556.Sep 7 2016, 10:06 AM
jlebar retitled this revision from to [NVPTX] Implement llvm.fabs.f32, llvm.max.f32, etc..
jlebar updated this object.
jlebar added a reviewer: majnemer.
jlebar added subscribers: tra, jholewinski, llvm-commits.
tra added inline comments.Sep 7 2016, 10:27 AM
llvm/test/CodeGen/NVPTX/math-intrins.ll
191 ↗(On Diff #70556)

For min/max I'd add few cases with an immediate value as the second argument.

jlebar updated this revision to Diff 70575.Sep 7 2016, 11:29 AM
jlebar marked an inline comment as done.

Add min/max with imm tests.

majnemer accepted this revision.Sep 9 2016, 2:02 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 9 2016, 2:02 PM
This revision was automatically updated to reflect the committed changes.