[llvm] [MemDep] Treat partial-overlap lifetime.start as a clobber (PR #211167)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 01:02:41 PDT 2026


================
@@ -0,0 +1,73 @@
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
+
+; Regression test for
+; https://github.com/llvm/llvm-project/issues/194940
+; GVN Load PRE must not hoist a load across @llvm.lifetime.start of the
+; alloca it accesses (partial overlap).
+
+target datalayout = "e-p:64:64-i64:64-n32:64-S128"
+
+%Struct = type { [80 x i8], i16 }
+
+declare void @opaque(ptr)
+declare void @llvm.lifetime.start.p0(ptr captures(none))
+declare void @llvm.lifetime.end.p0(ptr captures(none))
----------------
nikic wrote:

Intrinsic declarations are not needed.

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


More information about the llvm-commits mailing list