[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / PowerPC / available-externally.ll
blob51b972bd3d774f4ea69aa639eaa51c739d6093f9
1 ; RUN: llc -verify-machineinstrs < %s -relocation-model=static | FileCheck %s -check-prefix=STATIC
2 ; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PIC
3 ; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc-unknown-linux | FileCheck %s -check-prefix=PICELF
4 ; RUN: llc -verify-machineinstrs < %s -relocation-model=pic -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PIC64
6 ;;; KB: These two tests currently cause an assertion. It seems as though we cannot have a non DSOLocal symbol with dynamic-no-pic.
7 ;;;     I need to ask Sean about this.
8 ;;; RUN-NOT: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=DYNAMIC
9 ;;; RUN-NOT: llc -verify-machineinstrs < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=DYNAMIC64
10 ; PR4482
11 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
12 target triple = "powerpc-unknown-linux-gnu"
14 define i32 @foo(i64 %x) nounwind {
15 entry:
16 ; STATIC: foo:
17 ; STATIC: bl exact_log2@PLT
18 ; STATIC: blr
20 ; PIC: foo:
21 ; PIC: bl exact_log2@PLT
22 ; PIC: blr
24 ; PICELF: foo:
25 ; PICELF: bl exact_log2@PLT
26 ; PICELF: blr
28 ; PIC64: foo:
29 ; PIC64: bl exact_log2
30 ; PIC64: blr
32 ; DYNAMIC: foo:
33 ; DYNAMIC: bl exact_log2@PLT
34 ; DYNAMIC: blr
36 ; DYNAMIC64: foo:
37 ; DYNAMIC64: bl exact_log2@PPLT
38 ; DYNAMIC64: blr
40         %A = call i32 @exact_log2(i64 %x) nounwind
41         ret i32 %A
44 define available_externally i32 @exact_log2(i64 %x) nounwind {
45 entry:
46         ret i32 42