[llvm] [LowerMemIntrinsics] Optimize memset lowering (PR #169040)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 16 12:53:56 PST 2026
================
@@ -983,10 +983,197 @@ static void createMemMoveLoopKnownSize(Instruction *InsertBefore,
}
}
+/// Create a Value of \p DstType that consists of a sequence of copies of
+/// \p SetValue, using bitcasts and a vector splat.
+static Value *createMemSetSplat(const DataLayout &DL, IRBuilderBase &B,
+ Value *SetValue, Type *DstType) {
+ unsigned DstSize = DL.getTypeStoreSize(DstType);
+ Type *SetValueType = SetValue->getType();
+ unsigned SetValueSize = DL.getTypeStoreSize(SetValueType);
----------------
arsenm wrote:
Keep these all in TypeSize
https://github.com/llvm/llvm-project/pull/169040
More information about the llvm-commits
mailing list