[llvm] [ThinLTO] Don't mark calloc function dead (PR #72673)

Steven Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 11:55:32 PST 2023


================
@@ -0,0 +1,21 @@
+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"
+
+ at _ZZ6mallocE3buf = internal global [2000 x i8] zeroinitializer, align 1
+
+define hidden ptr @malloc(i64 %a) #0 {
+entry:
+  ret ptr @_ZZ6mallocE3buf
+}
+
+define hidden ptr @calloc(i64 noundef %num, i64 noundef %size) {
+entry:
----------------
cachemeifyoucan wrote:

I will further cut down this test case since the implementation of `calloc` doesn't matter here.

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


More information about the llvm-commits mailing list