diff options
author | Craig Topper <craig.topper@intel.com> | 2017-07-09 07:04:03 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-07-09 07:04:03 +0000 |
commit | fde4723ebead58f0342ae88abd1cc5ad795a5e5b (patch) | |
tree | 373399d8986978b02ec9e21161eb4a569f77ecac /llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp | |
parent | 95d2347ae16335aa30139c0aa6c050ac3dce2ad7 (diff) | |
download | bcm5719-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.cpp | 3 |
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) { |