aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2012-10-30 18:29:42 +0000
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2012-10-30 18:29:42 +0000
commitc83b5dc625bd85276a23c36c1fbad193203d2bc7 (patch)
tree877728d5f2993c57f1a92196910a7e5fe7f03e10 /lib/Target/PowerPC
parentcc03331caaeee00b1238654feda8c5a517e48c3a (diff)
downloadexternal_llvm-c83b5dc625bd85276a23c36c1fbad193203d2bc7.zip
external_llvm-c83b5dc625bd85276a23c36c1fbad193203d2bc7.tar.gz
external_llvm-c83b5dc625bd85276a23c36c1fbad193203d2bc7.tar.bz2
PowerPC: Expand FSRQT for vector types
This patch expands FSQRT for floating point vector types when altivec is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 8754b26..541bda5 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -363,6 +363,12 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
setOperationAction(ISD::CTTZ_ZERO_UNDEF, VT, Expand);
}
+ for (unsigned i = (unsigned)MVT::FIRST_FP_VECTOR_VALUETYPE;
+ i <= (unsigned)MVT::LAST_FP_VECTOR_VALUETYPE; ++i) {
+ MVT::SimpleValueType VT = (MVT::SimpleValueType)i;
+ setOperationAction(ISD::FSQRT, VT, Expand);
+ }
+
// We can custom expand all VECTOR_SHUFFLEs to VPERM, others we can handle
// with merges, splats, etc.
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v16i8, Custom);