[PATCH] D82211: [SVE] Remove calls to VectorType::getNumElements from ExecutionEngine
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 14:07:52 PDT 2020
ctetreau updated this revision to Diff 273151.
ctetreau added a comment.
address code review issues
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82211/new/
https://reviews.llvm.org/D82211
Files:
llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
===================================================================
--- llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -624,10 +624,12 @@
}
}
break;
- case Type::FixedVectorTyID:
case Type::ScalableVectorTyID:
+ report_fatal_error(
+ "Scalable vector support not yet implemented in ExecutionEngine");
+ case Type::FixedVectorTyID:
// if the whole vector is 'undef' just reserve memory for the value.
- auto *VTy = cast<VectorType>(C->getType());
+ auto *VTy = cast<FixedVectorType>(C->getType());
Type *ElemTy = VTy->getElementType();
unsigned int elemNum = VTy->getNumElements();
Result.AggregateVal.resize(elemNum);
@@ -927,9 +929,9 @@
elemNum = CDV->getNumElements();
ElemTy = CDV->getElementType();
} else if (CV || CAZ) {
- auto* VTy = cast<VectorType>(C->getType());
- elemNum = VTy->getNumElements();
- ElemTy = VTy->getElementType();
+ auto *VTy = cast<FixedVectorType>(C->getType());
+ elemNum = VTy->getNumElements();
+ ElemTy = VTy->getElementType();
} else {
llvm_unreachable("Unknown constant vector type!");
}
@@ -1100,7 +1102,8 @@
}
case Type::FixedVectorTyID:
case Type::ScalableVectorTyID: {
- auto *VT = cast<VectorType>(Ty);
+ // FIXME: this needs to handle scalable vectors correctly
+ auto *VT = cast<FixedVectorType>(Ty);
Type *ElemT = VT->getElementType();
const unsigned numElems = VT->getNumElements();
if (ElemT->isFloatTy()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82211.273151.patch
Type: text/x-patch
Size: 1675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200624/699f99ac/attachment.bin>
More information about the llvm-commits
mailing list