llvm/test/CodeGen/PowerPC/func-addr.ll
raw| 1 | ; RUN: llc -relocation-model=static -verify-machineinstrs -mtriple powerpc64-linux < %s | FileCheck %s |
| 2 | ; RUN: llc -relocation-model=static -verify-machineinstrs -O0 -mtriple powerpc64-linux < %s | FileCheck %s |
| 3 | |
| 4 | define dso_local void @foo() { |
| 5 | ret void |
| 6 | } |
| 7 | declare i32 @bar(ptr) |
| 8 | |
| 9 | ; CHECK-LABEL: {{^}}zed: |
| 10 | ; CHECK: addis 3, 2, foo@toc@ha |
| 11 | ; CHECK-NEXT: addi 3, 3, foo@toc@l |
| 12 | ; CHECK-NEXT: bl bar |
| 13 | |
| 14 | define void @zed() { |
| 15 | call i32 @bar(ptr @foo) |
| 16 | ret void |
| 17 | } |