diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-14 20:04:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-14 20:04:46 +0000 |
commit | 7f8613e5b8398b688080e3c944ab8c11593e1ed0 (patch) | |
tree | 2fe3e36cf3119d4e00b2da9dcaf673b464d9405b /lib/VMCore/Verifier.cpp | |
parent | 22ae99908258dd5631fde7128a94c418ed08eae5 (diff) | |
download | external_llvm-7f8613e5b8398b688080e3c944ab8c11593e1ed0.zip external_llvm-7f8613e5b8398b688080e3c944ab8c11593e1ed0.tar.gz external_llvm-7f8613e5b8398b688080e3c944ab8c11593e1ed0.tar.bz2 |
Improve support for vector casts in LLVM IR and CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 90f22df..b1b413c 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -665,8 +665,8 @@ void Verifier::visitTruncInst(TruncInst &I) { unsigned SrcBitSize = SrcTy->getPrimitiveSizeInBits(); unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); - Assert1(SrcTy->isInteger(), "Trunc only operates on integer", &I); - Assert1(DestTy->isInteger(), "Trunc only produces integer", &I); + Assert1(SrcTy->isIntOrIntVector(), "Trunc only operates on integer", &I); + Assert1(DestTy->isIntOrIntVector(), "Trunc only produces integer", &I); Assert1(SrcBitSize > DestBitSize,"DestTy too big for Trunc", &I); visitInstruction(I); @@ -678,8 +678,8 @@ void Verifier::visitZExtInst(ZExtInst &I) { const Type *DestTy = I.getType(); // Get the size of the types in bits, we'll need this later - Assert1(SrcTy->isInteger(), "ZExt only operates on integer", &I); - Assert1(DestTy->isInteger(), "ZExt only produces an integer", &I); + Assert1(SrcTy->isIntOrIntVector(), "ZExt only operates on integer", &I); + Assert1(DestTy->isIntOrIntVector(), "ZExt only produces an integer", &I); unsigned SrcBitSize = SrcTy->getPrimitiveSizeInBits(); unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); @@ -697,8 +697,8 @@ void Verifier::visitSExtInst(SExtInst &I) { unsigned SrcBitSize = SrcTy->getPrimitiveSizeInBits(); unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); - Assert1(SrcTy->isInteger(), "SExt only operates on integer", &I); - Assert1(DestTy->isInteger(), "SExt only produces an integer", &I); + Assert1(SrcTy->isIntOrIntVector(), "SExt only operates on integer", &I); + Assert1(DestTy->isIntOrIntVector(), "SExt only produces an integer", &I); Assert1(SrcBitSize < DestBitSize,"Type too small for SExt", &I); visitInstruction(I); @@ -712,8 +712,8 @@ void Verifier::visitFPTruncInst(FPTruncInst &I) { unsigned SrcBitSize = SrcTy->getPrimitiveSizeInBits(); unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); - Assert1(SrcTy->isFloatingPoint(),"FPTrunc only operates on FP", &I); - Assert1(DestTy->isFloatingPoint(),"FPTrunc only produces an FP", &I); + Assert1(SrcTy->isFPOrFPVector(),"FPTrunc only operates on FP", &I); + Assert1(DestTy->isFPOrFPVector(),"FPTrunc only produces an FP", &I); Assert1(SrcBitSize > DestBitSize,"DestTy too big for FPTrunc", &I); visitInstruction(I); @@ -728,8 +728,8 @@ void Verifier::visitFPExtInst(FPExtInst &I) { unsigned SrcBitSize = SrcTy->getPrimitiveSizeInBits(); unsigned DestBitSize = DestTy->getPrimitiveSizeInBits(); - Assert1(SrcTy->isFloatingPoint(),"FPExt only operates on FP", &I); - Assert1(DestTy->isFloatingPoint(),"FPExt only produces an FP", &I); + Assert1(SrcTy->isFPOrFPVector(),"FPExt only operates on FP", &I); + Assert1(DestTy->isFPOrFPVector(),"FPExt only produces an FP", &I); Assert1(SrcBitSize < DestBitSize,"DestTy too small for FPExt", &I); visitInstruction(I); |