[Demangle] Add a few more options to the microsoft demangler
[llvm-complete.git] / test / CodeGen / PowerPC / ppc64-sibcall-shrinkwrap.ll
blob251cd66461ba6b5c4fc8042237057a3f3496b4b0
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 ; Edit: D63152 prevents stack popping before loads and stores, so shrink-wrap does nothing here
6 %"class.clang::NamedDecl" = type { i32 }
7 declare void @__assert_fail();
9 define i8 @_ZNK5clang9NamedDecl23getLinkageAndVisibilityEv(
10     %"class.clang::NamedDecl"* %this) {
11 entry:
12   %tobool = icmp eq %"class.clang::NamedDecl"* %this, null
13   br i1 %tobool, label %cond.false, label %exit
15 cond.false:
16   tail call void @__assert_fail()
17   unreachable
19 exit:
20   %DeclKind = getelementptr inbounds
21                             %"class.clang::NamedDecl",
22                             %"class.clang::NamedDecl"* %this, i64 0, i32 0
23   %bf.load = load i32, i32* %DeclKind, align 4
24   %call.i = tail call i8 @LVComputationKind(
25     %"class.clang::NamedDecl"* %this,
26     i32 %bf.load)
27   ret i8 %call.i
29 ; CHECK-SCO-SHRK-LABEL: _ZNK5clang9NamedDecl23getLinkageAndVisibilityEv:
30 ; CHECK-SCO-SHRK: b LVComputationKind
31 ; CHECK-SCO-SHRK: #TC_RETURNd8
32 ; CHECK-SCO-SHRK: stdu 1, -{{[0-9]+}}(1)
33 ; CHECK-SCO-SHRK: bl __assert_fail
35 ; CHECK-SCO-ONLY-LABEL: _ZNK5clang9NamedDecl23getLinkageAndVisibilityEv:
36 ; CHECK-SCO-ONLY: stdu 1, -{{[0-9]+}}(1)
37 ; CHECK-SCO-ONLY: b LVComputationKind
38 ; CHECK-SCO-ONLY: #TC_RETURNd8
39 ; CHECK-SCO-ONLY: bl __assert_fail
42 define fastcc i8 @LVComputationKind(
43     %"class.clang::NamedDecl"* %D,
44     i32 %computation) {
45   ret i8 0