Skip to content

Commit 426f0d3

Browse files
IcohedronGreg Roth
andauthored
Add a comment for ByteLength == 0 case of memcpy
Co-authored-by: Greg Roth <[email protected]>
1 parent b44152e commit 426f0d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/DirectX/DXILLegalizePass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ static void emitMemcpyExpansion(IRBuilder<> &Builder, Value *Dst, Value *Src,
250250
ConstantInt *Length) {
251251

252252
uint64_t ByteLength = Length->getZExtValue();
253+
// If length to copy is zero, no memcpy is needed.
253254
if (ByteLength == 0)
254255
return;
255256

0 commit comments

Comments
 (0)