[NVPTX] Implement llvm.fabs.f32, llvm.max.f32, etc.
authorJustin Lebar <jlebar@google.com>
Fri, 9 Sep 2016 21:07:26 +0000 (21:07 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 9 Sep 2016 21:07:26 +0000 (21:07 +0000)
commitb5e884976b71a1bd12653d6c4d67bf121da95e5f
tree5eb0b0d93c449f405ba340403edab83f0e7de3c2
parentb9e51397bfe1fdbf0f1ae444744a8958b985bcb4
[NVPTX] Implement llvm.fabs.f32, llvm.max.f32, etc.

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.

Reviewers: majnemer

Subscribers: llvm-commits, jholewinski, tra

Differential Revision: https://reviews.llvm.org/D24300

llvm-svn: 281092
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
llvm/test/CodeGen/NVPTX/bug22322.ll
llvm/test/CodeGen/NVPTX/math-intrins.ll [new file with mode: 0644]