简体   繁体   中英

LLVM type cast fails for the types having in total differnt number of bits

I try to perform casting in LLVm using BitCastInst and

 iType = dyn_cast<Type>(VectorType::get(iType, eleCount));

My question : is it possible to cast from vector type with 3 elemnts of Int16Ty to vector type having 1 lement of 64 bit(Int64Ty) (padding the original one with 16 zeros if needed)?

Since total numeber of bits in differnt in the above example looks like it is impossible to make such cast. Thank you

Whether you can use dyn_cast has nothing to do with the bitwidth of the types.

dyn_cast and al. are for casting within the inheritance hierarchy of LLVM types, and more precise, for casting from Base toward Derived.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM