[llvm] [MemCpyOpt] Fix the invalid code modification for GEP (PR #68479)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 8 07:53:06 PDT 2023


================
@@ -0,0 +1,63 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=memcpyopt < %s -verify-memoryssa | FileCheck %s
+
+; ModuleID = 'memcpy_invalid_modify.ll'
+source_filename = "memcpy_invalid_modify.ll"
+
+%struct.MaskedType = type { i8, i8 }
+
+declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #0
+declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #0
+declare void @MaskedFunction1(ptr, ptr addrspace(1))
+declare void @MaskedFunction2(ptr, ptr)
+
+define i8 @test_gep_not_modified(ptr noundef %in0, ptr noundef %in1) {
----------------
nikic wrote:

Drop noundef here and elsewhere.

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


More information about the llvm-commits mailing list