summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-07-09 07:04:03 +0000
committerCraig Topper <craig.topper@intel.com>2017-07-09 07:04:03 +0000
commitfde4723ebead58f0342ae88abd1cc5ad795a5e5b (patch)
tree373399d8986978b02ec9e21161eb4a569f77ecac /llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
parent95d2347ae16335aa30139c0aa6c050ac3dce2ad7 (diff)
downloadbcm5719-llvm-fde4723ebead58f0342ae88abd1cc5ad795a5e5b.tar.gz
bcm5719-llvm-fde4723ebead58f0342ae88abd1cc5ad795a5e5b.zip
[IR] Add Type::isIntOrIntVectorTy(unsigned) similar to the existing isIntegerTy(unsigned), but also works for vectors.
llvm-svn: 307492
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
index 34099c6064c..9ac768b2189 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
@@ -779,8 +779,7 @@ int SystemZTTIImpl::
getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) {
// vlvgp will insert two grs into a vector register, so only count half the
// number of instructions.
- if (Opcode == Instruction::InsertElement &&
- Val->getScalarType()->isIntegerTy(64))
+ if (Opcode == Instruction::InsertElement && Val->isIntOrIntVectorTy(64))
return ((Index % 2 == 0) ? 1 : 0);
if (Opcode == Instruction::ExtractElement) {
OpenPOWER on IntegriCloud