aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-c-test
diff options
context:
space:
mode:
authorCraig Disselkoen <craigdissel@gmail.com>2020-10-28 16:48:22 -0400
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-28 18:19:34 -0400
commitc3783847ae67d31aece461458d8510b8bd0469c3 (patch)
tree946b41208e5f8a566ceb764998c66b94b72eadcc /llvm/tools/llvm-c-test
parent90678f65ae47523586bd34392ed3cd1369cf5e9b (diff)
downloadllvm-c3783847ae67d31aece461458d8510b8bd0469c3.zip
llvm-c3783847ae67d31aece461458d8510b8bd0469c3.tar.gz
llvm-c3783847ae67d31aece461458d8510b8bd0469c3.tar.bz2
C API: support scalable vectors
This adds support for scalable vector types in the C API and in llvm-c-test, and also adds a test to ensure that llvm-c-test can properly roundtrip operations involving scalable vectors. While creating this diff, I discovered that the C API cannot properly roundtrip _constant expressions_ involving shufflevector / scalable vectors, but that seems to be a separate enough issue that I plan to address it in a future diff (unless reviewers feel it should be addressed here). Differential Revision: https://reviews.llvm.org/D89816
Diffstat (limited to 'llvm/tools/llvm-c-test')
-rw-r--r--llvm/tools/llvm-c-test/echo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-c-test/echo.cpp b/llvm/tools/llvm-c-test/echo.cpp
index 0b3a10f..47dddd3 100644
--- a/llvm/tools/llvm-c-test/echo.cpp
+++ b/llvm/tools/llvm-c-test/echo.cpp
@@ -139,14 +139,14 @@ struct TypeCloner {
Clone(LLVMGetElementType(Src)),
LLVMGetPointerAddressSpace(Src)
);
- case LLVMScalableVectorTypeKind:
- // FIXME: scalable vectors unsupported
- break;
case LLVMVectorTypeKind:
return LLVMVectorType(
Clone(LLVMGetElementType(Src)),
LLVMGetVectorSize(Src)
);
+ case LLVMScalableVectorTypeKind:
+ return LLVMScalableVectorType(Clone(LLVMGetElementType(Src)),
+ LLVMGetVectorSize(Src));
case LLVMMetadataTypeKind:
return LLVMMetadataTypeInContext(Ctx);
case LLVMX86_MMXTypeKind: