[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / CodeGen / PowerPC / ppc64-sibcall-shrinkwrap.ll
blob856b66d4e7a19401caad0e11f5932f567c18f757
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-ONLY
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-ONLY
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 ;; Edit: D63152 prevents stack popping before loads and stores, so shrink-wrap does nothing here
8 %"class.clang::NamedDecl" = type { i32 }
9 declare void @__assert_fail();
11 define dso_local i8 @_ZNK5clang9NamedDecl23getLinkageAndVisibilityEv(
12     %"class.clang::NamedDecl"* %this) {
13 entry:
14   %tobool = icmp eq %"class.clang::NamedDecl"* %this, null
15   br i1 %tobool, label %cond.false, label %exit
17 cond.false:
18   tail call void @__assert_fail()
19   unreachable
21 exit:
22   %DeclKind = getelementptr inbounds
23                             %"class.clang::NamedDecl",
24                             %"class.clang::NamedDecl"* %this, i64 0, i32 0
25   %bf.load = load i32, i32* %DeclKind, align 4
26   %call.i = tail call i8 @LVComputationKind(
27     %"class.clang::NamedDecl"* %this,
28     i32 %bf.load)
29   ret i8 %call.i
31 ; CHECK-SCO-SHRK-LABEL: _ZNK5clang9NamedDecl23getLinkageAndVisibilityEv:
32 ; CHECK-SCO-SHRK: b LVComputationKind
33 ; CHECK-SCO-SHRK: #TC_RETURNd8
34 ; CHECK-SCO-SHRK: stdu 1, -{{[0-9]+}}(1)
35 ; CHECK-SCO-SHRK: bl __assert_fail
37 ; CHECK-SCO-ONLY-LABEL: _ZNK5clang9NamedDecl23getLinkageAndVisibilityEv:
38 ; CHECK-SCO-ONLY: stdu 1, -{{[0-9]+}}(1)
39 ; CHECK-SCO-ONLY: b LVComputationKind
40 ; CHECK-SCO-ONLY: #TC_RETURNd8
41 ; CHECK-SCO-ONLY: bl __assert_fail
43 ; CHECK-AIX: LLVM ERROR: Tail call support is unimplemented on AIX.
46 define dso_local fastcc i8 @LVComputationKind(
47     %"class.clang::NamedDecl"* %D,
48     i32 %computation) {
49   ret i8 0