brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 7b4bb89 Raw
43 lines · plain
1; RUN: llc %s -o - -mtriple=powerpc | FileCheck --check-prefix=REL %s2; RUN: llc %s -o - -mtriple=powerpc -relocation-model=pic | FileCheck --check-prefix=PLTREL %s3; RUN: llc %s -o - -mtriple=powerpc64 | FileCheck --check-prefix=REL %s4; RUN: llc %s -o - -mtriple=powerpc64 -relocation-model=pic | FileCheck --check-prefix=REL %s5; RUN: llc %s -o - -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 \6; RUN:   -verify-machineinstrs | FileCheck --check-prefix=LEP8 %s7; RUN: llc %s -o - -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 \8; RUN:   -verify-machineinstrs | FileCheck --check-prefix=LEP10 %s9 10@ifunc1 = dso_local ifunc void(), ptr @resolver11@ifunc2 = ifunc void(), ptr @resolver12 13define ptr @resolver() { ret ptr null }14 15define void @foo() #0 {16  ; REL-LABEL:    foo17  ; REL:          bl ifunc1{{$}}18  ; REL:          bl ifunc2{{$}}19  ; PLTREL-LABEL: foo20  ; PLTREL:       bl ifunc1@PLT+3276821  ; PLTREL:       bl ifunc2@PLT+3276822  ; LEP8-LABEL:   foo23  ; LEP8:         bl ifunc124  ; LEP8-NEXT:    nop25  ; LEP8-NEXT:    bl ifunc226  ; LEP8-NEXT:    nop27  ; LEP8:         blr28  ; LEP10-LABEL:  foo29  ; LEP10:        bl ifunc1@notoc30  ; LEP10-NEXT:   bl ifunc2@notoc31  ; LEP10-NOT:    nop32  ; LEP10:        blr33  call void @ifunc1()34  call void @ifunc2()35  ret void36}37 38;; Use Secure PLT ABI for PPC32.39attributes #0 = { "target-features"="+secure-plt" }40 41!llvm.module.flags = !{!0}42!0 = !{i32 1, !"PIC Level", i32 2}43