Teach codegen to lower llvm.powi to an efficient (but not optimal)
authorChris Lattner <sabre@nondot.org>
Fri, 1 Jan 2010 03:32:16 +0000 (03:32 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 1 Jan 2010 03:32:16 +0000 (03:32 +0000)
commitf031e8ad011e9ad95d7c965936da07e3a9c42add
treef548e6e940434f362f095323d22b87f189df7433
parent0fba8cf9ffbb4397d3ddbb51469c8819d0faf3cc
Teach codegen to lower llvm.powi to an efficient (but not optimal)
multiply sequence when the power is a constant integer.  Before, our
codegen for std::pow(.., int) always turned into a libcall, which was
really inefficient.

This should also make many gfortran programs happier I'd imagine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92388 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/Target/README.txt
test/CodeGen/X86/2007-09-27-LDIntrinsics.ll
test/CodeGen/X86/powi.ll [new file with mode: 0644]