[llvm] [DSE] Split memory intrinsics if they are dead in the middle (PR #75478)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 02:55:50 PDT 2024


https://github.com/DianQK commented:

Have you handled the case where the alignments are different?​

For example,
```llvm
define void @overwrite_middle(ptr  %X) {
entry:
  tail call void @llvm.memset.p0.i64(ptr  align 16 dereferenceable(1000) %X, i8 5, i64 1000, i1 false)
  %arrayidx = getelementptr inbounds i8, ptr %X, i64 15
  tail call void @llvm.memset.p0.i64(ptr  align 1 dereferenceable(980) %arrayidx, i8 3, i64 980, i1 false)
  ret void
}
```

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


More information about the llvm-commits mailing list