summaryrefslogtreecommitdiff
path: root/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-03-29 07:04:54 +0000
committerTim Northover <tnorthover@apple.com>2014-03-29 07:04:54 +0000
commit7c3e057ff49a67814a48a2702d56faf2a624f9a6 (patch)
tree096f2e9c4103328a2269378d50b09f226c3436b0 /lib/IR/Verifier.cpp
parent224dbf4aec6488e6ac55f2155a238e57086ef473 (diff)
downloadllvm-7c3e057ff49a67814a48a2702d56faf2a624f9a6.tar.gz
llvm-7c3e057ff49a67814a48a2702d56faf2a624f9a6.tar.bz2
llvm-7c3e057ff49a67814a48a2702d56faf2a624f9a6.tar.xz
Intrinsics: add LLVMHalfElementsVectorType constraint
This is like the LLVMMatchType, except the verifier checks that the second argument is a vector with the same base type and half the number of elements. This will be used by the ARM64 backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Verifier.cpp')
-rw-r--r--lib/IR/Verifier.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index aa84f230d0..089ad1ca5f 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -2206,6 +2206,12 @@ bool Verifier::VerifyIntrinsicType(Type *Ty,
return Ty != NewTy;
}
+ case IITDescriptor::HalfVecArgument:
+ // This may only be used when referring to a previous vector argument.
+ return D.getArgumentNumber() >= ArgTys.size() ||
+ !isa<VectorType>(ArgTys[D.getArgumentNumber()]) ||
+ VectorType::getHalfElementsVectorType(
+ cast<VectorType>(ArgTys[D.getArgumentNumber()])) != Ty;
}
llvm_unreachable("unhandled");
}