[llvm] [MemCpyOpt] Avoid infinite loops in `MemCpyOptPass::processMemCpyMemCpyDependence` (PR #103218)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 22:46:27 PDT 2024


dtcxzyw wrote:

Another reproducer:
```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@x = global i8 0, align 1

define void @func_140(ptr %l_1294) {
entry:
  %arrayidx565 = getelementptr i8, ptr %l_1294, i64 32
  %l_1712.sroa.9.0.arrayidx565.sroa_idx = getelementptr i8, ptr %l_1294, i64 34
  %arrayidx570 = getelementptr i8, ptr %l_1294, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr %arrayidx565, ptr %arrayidx570, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr @x, ptr %l_1712.sroa.9.0.arrayidx565.sroa_idx, i64 1, i1 false)
  ret void
}
```

https://github.com/llvm/llvm-project/pull/103218


More information about the llvm-commits mailing list