summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit4516de3412cd1e0cb445d475be407d0414b02595 (patch)
tree8e0cc0114a3cef3b8dee38a09a60cca84e160d61 /llvm/lib/IR/Verifier.cpp
parente2bab04b855f55206c7c3ce65dacf706b7dec5e8 (diff)
downloadbcm5719-llvm-4516de3412cd1e0cb445d475be407d0414b02595.tar.gz
bcm5719-llvm-4516de3412cd1e0cb445d475be407d0414b02595.zip
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. llvm-svn: 205079
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index aa84f230d01..089ad1ca5f2 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/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");
}
OpenPOWER on IntegriCloud