[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 08:40:44 PDT 2025


================
@@ -1990,21 +2028,56 @@ static bool canConvertValue(const DataLayout &DL, Type *OldTy, Type *NewTy) {
 static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
                            Type *NewTy) {
   Type *OldTy = V->getType();
-  assert(canConvertValue(DL, OldTy, NewTy) && "Value not convertable to type");
+
+#ifndef NDEBUG
+  BasicBlock *BB = IRB.GetInsertBlock();
+  assert(BB && BB->getParent() && "VScale unknown!");
----------------
sdesmalen-arm wrote:

Was it supposed to have "VScale unknown" as the message here?

https://github.com/llvm/llvm-project/pull/130973


More information about the cfe-commits mailing list