[llvm] b2dd4fa - [NFC]Update a ThinLTO test case (#117584)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 16:16:36 PST 2024


Author: Mingming Liu
Date: 2024-12-02T16:16:33-08:00
New Revision: b2dd4fabacd72d650a15116f361b1aa0020e2368

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

LOG: [NFC]Update a ThinLTO test case (#117584)

Run `function-import` pass in a similar way that it runs in a ThinLTO
distributed backend compile and checks that function alias is imported
as a definition. More accurately, the function alias
[is](https://github.com/llvm/llvm-project/blob/0c98776159cea0d1f391a8e1ac290483d4490240/llvm/lib/Transforms/IPO/FunctionImport.cpp#L1912)
a
[clone](https://github.com/llvm/llvm-project/blob/0c98776159cea0d1f391a8e1ac290483d4490240/llvm/lib/Transforms/IPO/FunctionImport.cpp#L1782)
of the aliasee function.

Added: 
    

Modified: 
    llvm/test/ThinLTO/X86/distributed_indexes.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/ThinLTO/X86/distributed_indexes.ll b/llvm/test/ThinLTO/X86/distributed_indexes.ll
index 4f2662b1b34e1b..824c582c2025eb 100644
--- a/llvm/test/ThinLTO/X86/distributed_indexes.ll
+++ b/llvm/test/ThinLTO/X86/distributed_indexes.ll
@@ -48,6 +48,10 @@
 ; RUN: llvm-dis %t1.bc.thinlto.bc -o - | FileCheck %s --check-prefix=DIS
 ; DIS: aliasee: null
 
+; RUN: opt -passes=function-import -import-all-index -summary-file=%t1.bc.thinlto.bc %t1.bc -S -o - 2>&1 | FileCheck %s --check-prefix=IR
+; Tests that analias definition is imported.
+; IR: define available_externally void @analias
+
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
 
 declare void @g(...)


        


More information about the llvm-commits mailing list