Skip to content

Commit b2dd4fa

Browse files
[NFC]Update a ThinLTO test case (llvm#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.
1 parent 6faf17b commit b2dd4fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/test/ThinLTO/X86/distributed_indexes.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
; RUN: llvm-dis %t1.bc.thinlto.bc -o - | FileCheck %s --check-prefix=DIS
4949
; DIS: aliasee: null
5050

51+
; 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
52+
; Tests that analias definition is imported.
53+
; IR: define available_externally void @analias
54+
5155
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
5256

5357
declare void @g(...)

0 commit comments

Comments
 (0)