xref: /llvm-project/llvm/test/CodeGen/PowerPC/weak_def_can_be_hidden.ll (revision 5403c59c608c08c8ecd4303763f08eb046eb5e4d)
1; taken from X86 version of the same test
2; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -O0 < %s | FileCheck %s
3; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O0 < %s | FileCheck %s
4
5@v1 = linkonce_odr local_unnamed_addr constant i32 32
6; CHECK: .section  .rodata,"a"
7; CHECK: .weak v1
8
9define i32 @f1() {
10  %x = load i32 , ptr @v1
11  ret i32 %x
12}
13
14@v2 = linkonce_odr constant i32 32
15; CHECK: .weak v2
16
17define ptr @f2() {
18  ret ptr @v2
19}
20
21@v3 = linkonce_odr unnamed_addr constant i32 32
22; CHECK: .section .rodata.cst4,"aM",
23; CHECK: .weak v3
24
25define ptr @f3() {
26  ret ptr @v3
27}
28
29@v4 = linkonce_odr unnamed_addr global i32 32
30; CHECK: .weak v4
31
32define i32 @f4() {
33  %x = load i32 , ptr @v4
34  ret i32 %x
35}
36