summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-07-15 09:41:11 +0200
committerGitHub <noreply@github.com>2024-07-15 09:41:11 +0200
commit71051deff27928cff908ea794e09806eee662801 (patch)
treed29e76e2aec4775c780f19b273adf9d797f3f446 /llvm/test/CodeGen
parent9ad72df55cb74b29193270c28f6974d2af8e0b71 (diff)
[MemCpyOpt] Fix infinite loop in memset+memcpy fold (#98638)
For the case where the memcpy size is zero, this transform is a complex no-op. This can lead to an infinite loop when the size is zero in a way that BasicAA understands, because it can still understand that dst and dst + src_size are MustAlias. I've tried to mitigate this before using the isZeroSize() check, but we can hit cases where InstSimplify doesn't understand that the size is zero, but BasicAA does. As such, this bites the bullet and adds an explicit isKnownNonZero() check to guard against no-op transforms. Fixes https://github.com/llvm/llvm-project/issues/98610.
Diffstat (limited to 'llvm/test/CodeGen')
0 files changed, 0 insertions, 0 deletions