HomePhabricator

[NVPTX] Implement NVPTXTargetLowering::getSqrtEstimate.

Authored by jlebar on Jan 30 2017, 9:58 PM.

Description

[NVPTX] Implement NVPTXTargetLowering::getSqrtEstimate.

Summary:

This lets us lower to sqrt.approx and rsqrt.approx under more
circumstances.

  • Now we emit sqrt.approx and rsqrt.approx for calls to @llvm.sqrt.f32, when fast-math is enabled. Previously, we only would emit it for calls to @llvm.nvvm.sqrt.f. (With this patch we no longer emit sqrt.approx for calls to @llvm.nvvm.sqrt.f; we rely on intcombine to simplify llvm.nvvm.sqrt.f into llvm.sqrt.f32.)
  • Now we emit the ftz version of rsqrt.approx when ftz is enabled. Previously, we only emitted rsqrt.approx when ftz was disabled.

Reviewers: hfinkel

Subscribers: llvm-commits, tra, jholewinski

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

llvm-svn: 293605

Details

Committed
jlebarJan 30 2017, 9:58 PM
Differential Revision
D28508: [NVPTX] Implement NVPTXTargetLowering::getSqrtEstimate.
Parents
rG93590e09d517: In VirtualCallChecker, handle indirect calls
Branches
Unknown
Tags
Unknown