Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10099,10 +10099,6 @@ LegalizerHelper::lowerMemCpyFamily(MachineInstr &MI, unsigned MaxLen) {
}

bool IsVolatile = MemOp->isVolatile();
if (Opc == TargetOpcode::G_MEMCPY_INLINE)
return lowerMemcpyInline(MI, Dst, Src, KnownLen, DstAlign, SrcAlign,
IsVolatile);

Comment on lines -10102 to -10105
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help review the pr and merge it if it looks good. Thanks.

The assertion around L10073 should already test no G_MEMCPY_INLINE is expected. Actually, the code looks dead when it's first introduced in a642872, and is still kept in a later refactoring change 36527cb.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lowerMemcpyInline overload is also probably dead

Copy link
Contributor Author

@petechou petechou Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I guess it's not. It's used in LegalizerHelper::lowerMemcpyInline(MachineInstr &MI) which is called by CombinerHelper::tryEmitMemcpyInline(MachineInstr &MI) from target pre-legalizer combiner.

// Don't try to optimize volatile.
if (IsVolatile)
return UnableToLegalize;
Expand Down