[llvm] [DirectX] Legalize memcpy (PR #139173)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 10:31:01 PDT 2025
================
@@ -246,6 +246,61 @@ downcastI64toI32InsertExtractElements(Instruction &I,
}
}
+static void emitMemcpyExpansion(IRBuilder<> &Builder, Value *Dst, Value *Src,
+ ConstantInt *Length) {
+
+ uint64_t ByteLength = Length->getZExtValue();
+ if (ByteLength == 0)
----------------
farzonl wrote:
should we error here? Returning here lets the memcpy live on past legalization. Feels weird that we would just let a memcpy live on if its malformed.
https://github.com/llvm/llvm-project/pull/139173
More information about the llvm-commits
mailing list