1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -relocation-model=static | FileCheck %s -check-prefix=STATIC 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=PIC 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -relocation-model=pic -mtriple=powerpc-unknown-linux | FileCheck %s -check-prefix=PICELF 4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-apple-darwin9 | FileCheck %s -check-prefix=PIC64 5*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=powerpc-apple-darwin9 | FileCheck %s -check-prefix=DYNAMIC 6*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-apple-darwin9 | FileCheck %s -check-prefix=DYNAMIC64 7*9880d681SAndroid Build Coastguard Worker; PR4482 8*9880d681SAndroid Build Coastguard Workertarget 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" 9*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc-apple-darwin9" 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdefine i32 @foo(i64 %x) nounwind { 12*9880d681SAndroid Build Coastguard Workerentry: 13*9880d681SAndroid Build Coastguard Worker; STATIC: _foo: 14*9880d681SAndroid Build Coastguard Worker; STATIC: bl _exact_log2 15*9880d681SAndroid Build Coastguard Worker; STATIC: blr 16*9880d681SAndroid Build Coastguard Worker; STATIC: .subsections_via_symbols 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker; PIC: _foo: 19*9880d681SAndroid Build Coastguard Worker; PIC: bl _exact_log2 20*9880d681SAndroid Build Coastguard Worker; PIC: blr 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker; PICELF: foo: 23*9880d681SAndroid Build Coastguard Worker; PICELF: bl exact_log2@PLT 24*9880d681SAndroid Build Coastguard Worker; PICELF: blr 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker; PIC64: _foo: 27*9880d681SAndroid Build Coastguard Worker; PIC64: bl _exact_log2 28*9880d681SAndroid Build Coastguard Worker; PIC64: blr 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Worker; DYNAMIC: _foo: 31*9880d681SAndroid Build Coastguard Worker; DYNAMIC: bl _exact_log2 32*9880d681SAndroid Build Coastguard Worker; DYNAMIC: blr 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker; DYNAMIC64: _foo: 35*9880d681SAndroid Build Coastguard Worker; DYNAMIC64: bl _exact_log2 36*9880d681SAndroid Build Coastguard Worker; DYNAMIC64: blr 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker %A = call i32 @exact_log2(i64 %x) nounwind 39*9880d681SAndroid Build Coastguard Worker ret i32 %A 40*9880d681SAndroid Build Coastguard Worker} 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Workerdefine available_externally i32 @exact_log2(i64 %x) nounwind { 43*9880d681SAndroid Build Coastguard Workerentry: 44*9880d681SAndroid Build Coastguard Worker ret i32 42 45*9880d681SAndroid Build Coastguard Worker} 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker; PIC: .subsections_via_symbols 49*9880d681SAndroid Build Coastguard Worker 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Worker; PIC64: .subsections_via_symbols 52