| 1 |
; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=false | FileCheck %s -check-prefix=CHECK-SCO-ONLY |
| 2 |
; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=true | FileCheck %s -check-prefix=CHECK-SCO-SR |
| 3 |
; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=false | FileCheck %s -check-prefix=CHECK-SCO-ONLY |
| 4 |
; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=true | FileCheck %s -check-prefix=CHECK-SCO-SR |
| 5 |
; RUN: not --crash llc -relocation-model=pic -verify-machineinstrs < %s -mtriple=powerpc64-ibm-aix-xcoff -tailcallopt -disable-ppc-sco=false --enable-shrink-wrap=true 2>&1 | FileCheck %s -check-prefix=CHECK-AIX |
| 6 |
;; The above RUN command is expected to fail on AIX since tail calling is not implemented ATM |
| 7 |
%"class.clang::NamedDecl" = type { i32 } |
| 8 |
declare void @__assert_fail(); |
| 9 |
|
| 10 |
define dso_local i8 @_ZNK5clang9NamedDecl23getLinkageAndVisibilityEv( |
| 11 |
ptr %this) { |
| 12 |
entry: |
| 13 |
%tobool = icmp eq ptr %this, null |
| 14 |
br i1 %tobool, label %cond.false, label %exit |
| 15 |
|
| 16 |
cond.false: |
| 17 |
tail call void @__assert_fail() |
| 18 |
unreachable |
| 19 |
|
| 20 |
exit: |
| 21 |
%bf.load = load i32, ptr %this, align 4 |
| 22 |
%call.i = tail call i8 @LVComputationKind( |
| 23 |
ptr %this, |
| 24 |
i32 %bf.load) |
| 25 |
ret i8 %call.i |
| 26 |
|
| 27 |
; CHECK-SCO-ONLY-LABEL: _ZNK5clang9NamedDecl23getLinkageAndVisibilityEv: |
| 28 |
; CHECK-SCO-ONLY: stdu 1, -{{[0-9]+}}(1) |
| 29 |
; CHECK-SCO-ONLY: b LVComputationKind |
| 30 |
; CHECK-SCO-ONLY: #TC_RETURNd8 |
| 31 |
; CHECK-SCO-ONLY: bl __assert_fail |
| 32 |
; |
| 33 |
; CHECK-SCO-SR-LABEL: _ZNK5clang9NamedDecl23getLinkageAndVisibilityEv: |
| 34 |
; CHECK-SCO-SR: b LVComputationKind |
| 35 |
; CHECK-SCO-SR: #TC_RETURNd8 |
| 36 |
; CHECK-SCO-SR: stdu 1, -{{[0-9]+}}(1) |
| 37 |
; CHECK-SCO-SR: bl __assert_fail |
| 38 |
|
| 39 |
; CHECK-AIX: LLVM ERROR: Tail call support is unimplemented on AIX. |
| 40 |
} |
| 41 |
|
| 42 |
define dso_local fastcc i8 @LVComputationKind( |
| 43 |
ptr %D, |
| 44 |
i32 %computation) { |
| 45 |
ret i8 0 |
| 46 |
} |