Skip to content
Commit 5e0f425c authored by Ahmed Bougacha's avatar Ahmed Bougacha
Browse files

[MemCpyOpt] Don't move the memset when optimizing memset+memcpy.

Fixes PR23599, another miscompile introduced by r235232: when there is
another dependency on the destination of the created memset (i.e., the
part of the original destination that the memcpy doesn't depend on)
between the memcpy and the original memset, we would insert the created
memset after the memcpy, and thus after the other dependency.

Instead, insert the created memset right after the old one.

llvm-svn: 237858
parent b103c032
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment