[llvm] [LSV] Merge contiguous chains across scalar types (PR #154069)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 08:04:14 PDT 2025


================
@@ -467,6 +489,98 @@ bool Vectorizer::run() {
   return Changed;
 }
 
+Value *Vectorizer::insertCast(Value *Val, Type *DstTy) {
+  if (DL.getTypeSizeInBits(Val->getType()) == DL.getTypeSizeInBits(DstTy)) {
+    return Builder.CreateBitOrPointerCast(Val, DstTy, Val->getName() + ".bc");
----------------
arsenm wrote:

The Create*Cast functions are a mess and I can never remember which one is which. If this is one of the ones that can create addrspacecast, that's a problem. This should never use addrspacecast (unless known it's a known no-op one)

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


More information about the llvm-commits mailing list