OSDN Git Service

[X86] Enable reciprocal estimates for v16f32 vectors by using VRCP14PS/VRSQRT14PS
authorCraig Topper <craig.topper@intel.com>
Sun, 6 May 2018 17:48:21 +0000 (17:48 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 6 May 2018 17:48:21 +0000 (17:48 +0000)
commit98e0a453a76293fdf48293db2a7c1b548024381f
treea742ca8bff64d69eec57d953ada7f1de99c01102
parente49d7b229d4e989d4552ee620c6a2ce6e05f0ae0
[X86] Enable reciprocal estimates for v16f32 vectors by using VRCP14PS/VRSQRT14PS

Summary:
The legacy VRCPPS/VRSQRTPS instructions aren't available in 512-bit versions. The new increased precision versions are. So we can use those to implement v16f32 reciprocal estimates.

For KNL CPUs we can probably use VRCP28PS/VRSQRT28PS and avoid the NR step altogether, but I leave that for a future patch.

Reviewers: spatel

Reviewed By: spatel

Subscribers: RKSimon, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331606 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/recip-fastmath.ll
test/CodeGen/X86/recip-fastmath2.ll
test/CodeGen/X86/sqrt-fastmath.ll