[llvm] [ThinLTO] Don't mark calloc function dead (PR #72673)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 07:56:42 PST 2023
================
@@ -0,0 +1,35 @@
+; RUN: opt -module-summary %s -o %t1.bc
+; RUN: opt -module-summary %p/Inputs/calloc.ll -o %t2.bc
+; RUN: llvm-lto2 run -save-temps -o %t.out \
+; RUN: %t1.bc -r=%t1.bc,_Z7DoStuffv,px -r=%t1.bc,_ZnwmRKSt9nothrow_t,px \
+; RUN: -r=%t1.bc,_ZSt7nothrow -r=%t1.bc,malloc,l \
+; RUN: %t2.bc -r=%t2.bc,malloc,pl -r=%t2.bc,calloc,pl
+; RUN: llvm-dis %t.out.2.5.precodegen.bc -o - | FileCheck %s
+
+; CHECK: define {{.*}} @calloc
----------------
teresajohnson wrote:
Actually, since you are only checking that the calloc def is not removed, can this test be simplified even further? I.e. you really only need a single source file with a def of calloc run through llvm-lto2, do you even need any of the other code?
https://github.com/llvm/llvm-project/pull/72673
More information about the llvm-commits
mailing list