| ; RUN: llc %s -o - -mtriple=powerpc | FileCheck --check-prefix=REL %s |
| ; RUN: llc %s -o - -mtriple=powerpc -relocation-model=pic | FileCheck --check-prefix=PLTREL %s |
| ; RUN: llc %s -o - -mtriple=powerpc64 | FileCheck --check-prefix=REL %s |
| ; RUN: llc %s -o - -mtriple=powerpc64 -relocation-model=pic | FileCheck --check-prefix=REL %s |
| ; RUN: llc %s -o - -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 \ |
| ; RUN: -verify-machineinstrs | FileCheck --check-prefix=LEP8 %s |
| ; RUN: llc %s -o - -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 \ |
| ; RUN: -verify-machineinstrs | FileCheck --check-prefix=LEP10 %s |
| @ifunc1 = dso_local ifunc void(), void()* ()* @resolver |
| @ifunc2 = ifunc void(), void()* ()* @resolver |
| define void()* @resolver() { ret void()* null } |
| ; PLTREL: bl ifunc1@PLT+32768 |
| ; PLTREL: bl ifunc2@PLT+32768 |
| ; LEP10-NEXT: bl ifunc2@notoc |
| ;; Use Secure PLT ABI for PPC32. |
| attributes #0 = { "target-features"="+secure-plt" } |
| !llvm.module.flags = !{!0} |
| !0 = !{i32 1, !"PIC Level", i32 2} |