1 ; RUN: llc %s -o - -mtriple=powerpc | FileCheck --check-prefix=REL %s
2 ; RUN: llc %s -o - -mtriple=powerpc -relocation-model=pic | FileCheck --check-prefix=PLTREL %s
3 ; RUN: llc %s -o - -mtriple=powerpc64 | FileCheck --check-prefix=REL %s
4 ; RUN: llc %s -o - -mtriple=powerpc64 -relocation-model=pic | FileCheck --check-prefix=REL %s
5 ; RUN: llc %s -o - -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 \
6 ; RUN: -verify-machineinstrs | FileCheck --check-prefix=LEP8 %s
7 ; RUN: llc %s -o - -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 \
8 ; RUN: -verify-machineinstrs | FileCheck --check-prefix=LEP10 %s
10 @ifunc1 = dso_local ifunc void(), ptr @resolver
11 @ifunc2 = ifunc void(), ptr @resolver
13 define ptr @resolver() { ret ptr null }
15 define void @foo() #0 {
20 ; PLTREL: bl ifunc1@PLT+32768
21 ; PLTREL: bl ifunc2@PLT+32768
25 ; LEP8-NEXT: bl ifunc2
29 ; LEP10: bl ifunc1@notoc
30 ; LEP10-NEXT: bl ifunc2@notoc
38 ;; Use Secure PLT ABI for PPC32.
39 attributes #0 = { "target-features"="+secure-plt" }
41 !llvm.module.flags = !{!0}
42 !0 = !{i32 1, !"PIC Level", i32 2}