[llvm] 986ca95 - [BPF] Add (failing) testcase for Issue #57872

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 16 10:18:42 PDT 2022


Author: Simon Pilgrim
Date: 2022-10-16T18:16:18+01:00
New Revision: 986ca95e064b095b808eee18e6434f51b38eba5b

URL: https://github.com/llvm/llvm-project/commit/986ca95e064b095b808eee18e6434f51b38eba5b
DIFF: https://github.com/llvm/llvm-project/commit/986ca95e064b095b808eee18e6434f51b38eba5b.diff

LOG: [BPF] Add (failing) testcase for Issue #57872

Added: 
    llvm/test/CodeGen/BPF/pr57872.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/BPF/pr57872.ll b/llvm/test/CodeGen/BPF/pr57872.ll
new file mode 100644
index 0000000000000..95291e550229e
--- /dev/null
+++ b/llvm/test/CodeGen/BPF/pr57872.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=bpf-- | FileCheck %s
+; XFAIL: *
+
+%struct.event = type { i8, [84 x i8] }
+
+define void @foo(ptr %g) {
+entry:
+  %event = alloca %struct.event, align 1
+  %hostname = getelementptr inbounds %struct.event, ptr %event, i64 0, i32 1
+  %0 = load ptr, ptr %g, align 8
+  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(84) %hostname, ptr noundef nonnull align 1 dereferenceable(84) %0, i64 84, i1 false)
+  call void @bar(ptr noundef nonnull %event)
+  ret void
+}
+
+declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2
+declare void @bar(ptr noundef)


        


More information about the llvm-commits mailing list